Questions and answers

Which regular expression syntax does it use?

JavaScript (ECMAScript), as your browser runs it: lookahead and lookbehind, named groups, Unicode property escapes with the u or v flag, and set operations with the v flag. Features of other engines, such as possessive quantifiers or recursion, are not available.

Why was my expression stopped?

Each run gets 2 seconds in a separate worker. Patterns with nested quantifiers, such as (a+)+$, can take exponential time on text that almost matches, so the run is stopped instead of freezing the page. Rewrite the pattern so each part of the text can match in only one way.

How do replacements work?

They follow JavaScript's rules: $1 to $99 insert numbered groups, $<name> a named group, $& the whole match, $` and $' the text before and after it, and $$ a dollar sign. Without the g flag, only the first match is replaced.

What do the flags do?

g finds every match instead of only the first, i ignores letter case, m makes ^ and $ match at the start and end of each line, s lets . match line breaks, u reads the pattern as Unicode (an emoji is one character and \p{…} classes work), v adds set operations to classes and cannot be combined with u, and y makes each match start exactly where the previous one ended.

Is my text sent anywhere?

No. The expression runs in a worker in this browser tab, and neither the expression nor the text leaves your device.

  • Text Cleaner Remove extra spaces, blank lines and hidden characters from pasted text, and join broken lines.
  • JWT Decoder Decode a JSON Web Token to read its header and claims, and check its signature with your key.
  • JSON Formatter Format, validate and minify JSON, with the exact line and column of any error.
  • JSON Minifier Minify JSON to one line without spaces, keeping numbers and strings exactly as written.

More Developer tools