Regex
Pattern | Legend | Example match |
\w | Any alphanumeric character, including underscores | a or 0 or _ |
\d | Any digit | 1 or 2 or 4 |
\s | Any whitespace character | ' ' |
+ | One or more (greedy) of the pattern or character | \d+ matches 476373 |
\. | The . character | . |
* | Zero or more (greedy) of the character or pattern | \d* matches 03289 and '' |
| | Either the first pattern, or the next, or the next (like OR) | \d|\w matches 0 or a |
[] or () | Character classes (defining what you expect to see in one character space) and character groupings (defining what you expect to see in a group) |
A matches [A-C] or (A|B|C) |
- | Binds character groups | [0-9]+ matches \d+ |
Comments
Post a Comment