Test a regular expression against text and see matches.
Free to use, no sign-up required. Regex Tester is one of 198 tools built into Xenition, alongside a chat that can use them for you.
Tests a regular expression against sample text and lists every match, for building or debugging a pattern before using it in code.
The pattern runs on your browser’s JavaScript regular expression engine, so its syntax is JavaScript’s, including lookbehind and named groups in current browsers. The g flag is always on, so every match is listed; i ignores case, m makes ^ and $ match at line breaks, s lets . match newlines and u enables Unicode mode. Only whole matches are shown, not capture groups, and up to 60 are displayed.
The pattern \d{3}-\d{4} on “Call 555-0142 or 555-0199 today” gives 2 matches: 555-0142 and 555-0199. The pattern cat with gi on “Cat cat CAT” gives 3 matches; with g alone it gives 1.
Patterns that can match nothing, such as \d*, also match the empty gap between characters. Use + instead of * when at least one character is required.
Basic syntax is shared, but details differ between engines, such as named group syntax and lookbehind rules. Test in the target language before relying on advanced features.
You do not have to open Regex Tester to use it. Ask Xenition in plain language and it runs the right tool, then carries the answer into whatever you are working on — a document, a spreadsheet, a deck.