|
In the table below we list the characters
used in .Net regular expressions, together with their meaning,
But first of all just goto
http://www.codeproject.com/dotnet/Expresso.asp and download Expresso,
its a great tool that i am using for a long time now and its great working with
it.
|
Character |
Meaning |
| \n, \r, \t |
Match literal new line, carriage return, tab |
| \\, \/, \*, \+, \?, etc. |
Match a special character literally, ignoring or
escaping its special meaning. |
| [...] |
Match any one character between brackets. |
| [^...] |
Match any one character ot between brackets. |
| . |
Match any character other than newline. |
| \w, \W |
Match any word/non-word character. |
| \s, \S |
Match any white space/non-white space. |
| \d, \D |
Match and digit/non-digit. |
| ^, $ |
Require match at beginning/end of a string, or in
multi-line mode beginning/end of a line. |
| \b, \B |
Require match at word boundary/non-boundary. |
| ? |
Optional term: Match zero or one time. |
| + |
Match previous term one or more times |
| * |
Match term zero or more times |
| {n} |
Match previous exactly n times. |
| {n,} |
Match previous term n or more times. |
| {n,m} |
Match at least n but no more than m times. |
| a | b |
Match either a or b. |
| (sub) |
Group sub expression sub into a single term, and
remember the text that it matched. |
| \n |
Match exactly the same characters that were
matched by sub expression number n. |
| $n |
In replacement strings, substitute the text that
matched the nth sub-expression. |
|
|
|
|