How to use the regex tester
A regular expression ("regex") is a pattern language for finding and manipulating text. Developers use it for validation (does this look like an email?), extraction (pull all numbers out of a string), and search-and-replace across logs and source code.
Type a pattern, optionally add flags such as g (global), i (case-insensitive), or m (multiline), and type or paste the test text. The tool evaluates the pattern immediately and lists every match together with its zero-based character index. The text below is also re-rendered with every match highlighted, so you can see exactly which characters were consumed.
If the pattern is invalid — an unterminated character class, an unmatched parenthesis, or an illegal quantifier — the tool reports the engine's error message instead of throwing an unhandled exception, so you can correct the pattern and keep going.
Example patterns to try
a+onbaaac→ matchesaaaat index 1.\d+onorder 123 and 45→ matches123and45.\b\w+@\w+\.\w+\bextracts simple email addresses.