Regex cheat-sheet:
Token | Description |
---|---|
. | any single character |
\d | any number |
\h | any horizontal white-space (space, tab, etc.) |
Token | Description |
---|---|
? | one or zero times |
* | any number of times (even zero - zero or more times) |
+ | at least once (one or more times) |
Token | Description |
---|---|
[abc] | any of the characters inside ('a' or 'b' or 'c') |
[a-z] | any of the characters inside the range (a through z) |
| | or |
() | group - for example '(foo|bar)' - 'foo' or 'bar' |