CorexoTools

Regex Tester

Test regular expressions against a string and see matches highlighted in real time.

What is a Regular Expression?

A regular expression (regex) is a sequence of characters that defines a search pattern. You can use regex to find, extract, or replace text that matches a specific structure — such as all email addresses in a document, all lines starting with a digit, or all words in CamelCase.

Regex Flags Explained

Common Regex Patterns

PatternMatches
\d+One or more digits
\w+One or more word characters (letters, digits, _)
\s+One or more whitespace characters
^.+$Non-empty lines (with multiline flag)
[a-zA-Z]+One or more letters
\b\w{5}\bExactly 5-character words

Frequently Asked Questions

Does this support lookaheads and lookbehinds?

Yes. This tester uses the JavaScript RegExp engine, which supports lookahead ((?=...), (?!...)) and lookbehind ((?<=...), (?<!...)) in modern browsers.

Why does my pattern fail?

Common causes: unescaped special characters (use \. to match a literal dot), mismatched parentheses, or using a flag combination the engine does not allow. The error message above the input shows the exact syntax error.

Is my data sent to a server?

No. All matching runs in your browser using the built-in JavaScript RegExp. No input is transmitted.