Quick regex syntax cheatsheet for developers.
| Pattern | Meaning |
|---|---|
| ^ | Start of string |
| $ | End of string |
| \b | Word boundary |
| Pattern | Meaning |
|---|---|
| * | 0 or more |
| + | 1 or more |
| ? | 0 or 1 |
| {n} | Exactly n |
| {n,} | n or more |
| {n,m} | Between n and m |
| Pattern | Meaning |
|---|---|
| . | Any char (except newline) |
| \d | Digit [0-9] |
| \D | Non-digit |
| \w | Word [a-zA-Z0-9_] |
| \s | Whitespace |
| [abc] | Any of a,b,c |
| [^abc] | Not a,b,c |
| [a-z] | Range a to z |
| Pattern | Meaning |
|---|---|
| (x) | Capturing group |
| (?:x) | Non-capturing |
| (?<name>x) | Named group |
| | | Alternation (or) |
| Pattern | Meaning |
|---|---|
| \n | Newline |
| \t | Tab |
| \\ | Backslash |
| \. | Literal . |
| Pattern | Meaning |
|---|---|
| g | Global |
| i | Case insensitive |
| m | Multiline |
| s | Dotall |
Reference for common regex syntax: anchors, quantifiers, character classes, groups, and flags.
Is this tool free to use?
Does the tool run in the browser?
Is my data uploaded to a server?
Can I use this tool for large files?