Regex Lab
A collection of small tools and utilities I've built for fun
Regex Lab
Test regular expressions with live matching.
Matches
| Pattern | Description |
|---|---|
| . | Any character except newline |
| \d | Digit (0-9) |
| \D | Not a digit |
| \w | Word character (a-z, A-Z, 0-9, _) |
| \W | Not a word character |
| \s | Whitespace (space, tab, newline) |
| \S | Not whitespace |
| \b | Word boundary |
| ^ | Start of string (or line with m flag) |
| $ | End of string (or line with m flag) |
| * | 0 or more |
| + | 1 or more |
| ? | 0 or 1 (optional) |
| {n} | Exactly n times |
| {n,m} | Between n and m times |
| [abc] | Character class (a, b, or c) |
| [^abc] | Not a, b, or c |
| (abc) | Capture group |
| (?:abc) | Non-capturing group |
| (?=abc) | Lookahead |
| (?!abc) | Negative lookahead |
| a|b | a or b |