Regular Expressions

Some people, when confronted with a problem, think "I know, I’ll use regular expressions." Now they have two problems.
Jamie Zawinski

Symbol Matches
. (dot) Any single character
\d Any single digit
[A-Z] Any character between A and Z (upercase)
[a-z] Any character between a and z (lowercase)
[A-Za-z] Any character between a and z (case-insensitive)
+ One or more of the previous expression
^ Matches the start of the string
? Zero or one of the previous expression
* Zero or more of the previous expression
? Matches the end of a line or string
{1,3} Between one and three (inclusive) of the previous expression
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.