How the regex tester works
A regular expression (regex) is a pattern that describes a set of strings. This tool compiles your pattern with the browser's native RegExp engine and runs it against your test text, so the rules it follows are exactly the JavaScript flavor of regex — the same one that runs in every web app.
Every match is highlighted in place. With the global flag g, all matches are found; without it, only the first. Capture groups in parentheses ( ) are reported separately so you can see exactly what each group captured.
Worked example
The pattern \b\w+@\w+\.\w+\b with flags gi finds email-like tokens:
[email protected] and [email protected] match; plain words don't.Flags and tips
Flags change how matching behaves: g finds every match, i is case-insensitive, m makes ^ and $ match line starts/ends, s lets . match newlines, and u enables full Unicode. Remember to escape special characters (. * + ? ( ) [ ] { } ^ $ | \) with a backslash when you mean them literally.