Friday, February 14, 2014

Regular expressions in short

Caret (^)Matches the expression at the start of a line, as in ^A
Question mark (?)Matches the expression at the end of a line, as in A?
Backslash ()Turns off the special meaning of the next character, as in ^
Brackets ([])Matches any one of the enclosed characters, as in [aeiou] (Use a hyphen [-] for a range, as in [0-9].)
[^ ] Matches any one character except those enclosed in brackets, as in [^0-9]
Period (.)Matches a single character of any value except end of line
Asterisk (*)Matches zero or more of the preceding characters or expressions
{x,y} Matches x to y occurrences of the preceding
{x} Matches exactly x occurrences of the preceding
{x,} Matches x or more occurrences of the preceding


Source: ibm.com
download
alternative link download

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.