Changes

Jump to navigation Jump to search
no edit summary
This is a page for regular expression hacks. Chronicle your exploits so that others can benefit from your ingenuity!
 
==Useful RegExes==
 
Pattern Matches
------------------
\t tab
\n newline
^ start of line
$ end of line
. any character
* any number of times
+ 1 or more times
? 0 or once
\s space
\d number
[0-9] any number (once)
[a-z] any letter (once)
[a-Z] any letter (case insensitive]
abc abc
[a|b|c] a or b or c
{1,3} 1, 2, or 3 times in a row
{3,} 3 or more times
() captures whatever is in the bracktets
\ escape the next thing (e.g. \} matches })

Navigation menu