Try a pattern on your text and review matching or replacement results. Optional AI assistance sends the description, pattern and flags to DeepSeek after confirmation.
Describe the matching rule or inspect the current pattern. Your tester text remains local.
—
The tester runs a pattern against sample text using the same engine your browser uses, so what matches here matches in your application. Flags, every match with its position, capture groups and a replacement preview are shown together.
Patterns are JavaScript, or ECMAScript, rather than PCRE or Python syntax. The dialects overlap heavily but not completely, which is the most common reason a pattern that works elsewhere fails here. Ready-made patterns for e-mail addresses, URLs, IP addresses, UUIDs, dates, times, hex colours and numbers are one click away.
This is ECMAScript. Named groups written (?<name>...), lookbehind assertions (?<=...) and (?<!...), and Unicode property escapes such as \p{Letter} with the u flag are all available in current browsers. Possessive quantifiers, atomic groups, recursion, \A and \Z anchors, and inline mode modifiers such as (?i) are not part of the language.
Differences of this kind break patterns that were written for Python, PHP or Java. Translating (?P<name>...) to (?<name>...), replacing \Z with $, and moving flags out of the pattern into the flag checkboxes covers most of the real-world cases.
Global search returns every match instead of stopping at the first, and it is also what makes a replacement apply throughout the text rather than only at the first hit. Ignore case makes letters match either case. Multiline lets ^ and $ match at line breaks inside the subject instead of only at the start and end of the whole string.
Dot matches newline lets a dot consume line terminators, which is what you want when matching a block of text. Unicode switches to code-point semantics, so a dot matches a full emoji rather than half of one, and enables the \p{...} property escapes.
Capture groups are numbered by the order of their opening parentheses, and a non-capturing group (?:...) keeps a group out of that numbering, which is useful when you only need the alternation. Named groups appear in the replacement as $<name>, which is far easier to read than $3 when a pattern grows.
In the replacement string, $1 to $99 insert captured groups, $& inserts the whole match, $$ inserts a literal dollar sign, and $` and $' insert everything before or after the match. Watch out for nested quantifiers such as (a+)+ against long input that almost matches: they can backtrack exponentially, which is the classic way a pattern freezes a page.
Accepts sample text, a JavaScript-compatible regex pattern, optional global/ignore-case/multiline/dot-all/unicode flags, and replacement text; displays every match and the resulting replacement output.
Debugging a validation regex for form input; testing extraction of document numbers or dates from logs; previewing a regex replacement before committing it to code.
Regex matching and replacement run in browser JavaScript; AI Assist sends only the description, current regular expression, and flags to DeepSeek, never the tester text.
The tester implements JavaScript regex semantics; date and address presets validate syntax only, not real calendar or postal values.
The dialects differ. Python writes named groups as (?P<name>...) and has \Z; Java and PCRE support possessive quantifiers and atomic groups; PHP allows inline modifiers like (?i). ECMAScript has none of those, so the pattern has to be translated rather than copied.
The global flag is off. Without it, a replacement stops after the first match, which is the behaviour of String.prototype.replace when the pattern is not global.
No. Only the description you type, the current pattern and its flags are sent for a generation or explanation request, and only after you confirm. The sample text you are testing stays in the browser.
A pattern with nested quantifiers can explore an exponential number of ways to fail, so a long non-matching string makes the engine appear to hang. Restructure the pattern to be more specific, prefer anchored alternatives, and test with a large realistic sample before shipping it.
Use the Multiline flag when you want ^ and $ to match at line boundaries, and Dot matches newline when a single expression has to span the break. The two solve different problems and are often needed together.
Yes. Press Copy regex and use the pattern with the flags shown here, either as a literal such as /pattern/g or through new RegExp when the pattern has to be built from a variable. Remember to escape backslashes again if the pattern lives inside a string literal.