Regular Expression

 

Simple

*	any string, 0 or more
+	one or more
?	any single character
.	any one char
^	beginning of line
$	end of line
^$	blank line
[  ]	set of characters
[^]	not in set of characters
\	escape character
\{\}	# of occurances [0-9]\{5\}
\{min,max\}
()	encloses groups of REs
|	or

Characters

Repetitions

Groups

* Back reference a group:

Special Characters

Positions

Alternatives

* One or Two

One|Two

Substitutions

RegEx Tools

* regexstorm.net/tester
* http://gskinner.com/RegExr/
* Expresso

References

* http://regexstorm.net/reference
* http://www.regular-expressions.info

This entry was posted in regex and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.