View Single Post
Old 10-11-2007, 11:52 PM   #7
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 10,564
Karma: 3586017
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
You are both welcome.

I happened to have a lex & yacc textbook next to me so I looked it up.

BTW, the '*' and '+' give slightly different results because

'*' matches zero or more characters inside the brackets, and

'+' matches one or more characters inside the brackets.

[a-z]
[A-Z]
[0-9]
[ ]
Each of the preceding is a variation of "match one of what's inside the brackets". They respectively mean look for only lowercase, uppercase, digits, and spaces. Note that the last one is not empty; it has a space in it. Also they can be combined.
[0-9a-zA-Z]
Please note the lack of spaces.

_{a,b} Match what is immediately before the brackets no less than a, no more than b.

_? Match zero or one occurrences of what's immediately before the '?'. Very useful for matching negative and positive numbers.

\_ Match whatever follows the '\' literally.

"match what is in between the quotes literally"


All of the above can be combined, but be careful.
That is most of what you will need for BD. Warning: I have not tested all of it in BD. But it is standard UNIX stuff from the textbook. It should work.

Last edited by Nate the great; 10-11-2007 at 11:56 PM.
Nate the great is offline   Reply With Quote