Test regular expressions against text with real-time matching and group capture.
Runs entirely in your browser.
Regular Expression Testing Tool
- Regular Expression — / /
- g global m multiline i case-insensitive s dotAll u unicode
- Test String
- Result
Anna and Ben are learning JavaScript Here. They practice every Monday.
Match Details
6 matches found
| # | Match | Index | Length |
|---|---|---|---|
| 1 | Anna | 0 | 4 |
| 2 | Ben | 9 | 3 |
| 3 | JavaScript | 26 | 10 |
| 4 | Example | 40 | 9 |
| 5 | They | 51 | 4 |
| 6 | Monday | 71 | 6 |
Quick Reference
| Pattern | Description |
|---|---|
| . | Any character except newline |
| \d | Digit (0-9) |
| \w | Word character (a-z, A-Z, 0-9, _) |
| \s | Whitespace |
| [abc] | Character class |
| ^ / $ | Start / end of line |
| * / + / ? | 0+, 1+, 0 or 1 |
| {n,m} | Between n and m times |
| (group) | Capture group |
| (?:group) | Non-capturing group |
| a | b |
About Regular Expressions
Regular Expressions are a powerful tool for pattern matching and text manipulation.
They are used in many programming languages and tools to search, replace, and validate text.