Write the pattern
With flags g, i, m, s, u, y. Errors in the pattern are shown as you type.
Developer
Write a pattern and see every match highlighted in the text as you type, with capture groups named and numbered, the replacement result for a substitution, and the match list exportable as JSON or CSV. The engine is JavaScript's, which shares most syntax with Python's re; differences are noted.
Loading the tool…
With flags g, i, m, s, u, y. Errors in the pattern are shown as you type.
Matches are highlighted in place; the side panel lists each match with its groups and position.
A replacement string with $1 or $<name> references previews the result; matches export as JSON or CSV.
Named groups are (?<name>...) in JavaScript and (?P<name>...) in Python; lookbehind works in both; possessive quantifiers and atomic groups are not in JavaScript.
The u flag enables \p{Script=Devanagari} and similar classes, which is how to match Hindi or Arabic script reliably.
Catastrophic backtracking is detected by a timeout so the tab does not hang; the pattern is flagged.
Yes; multiline mode with the m flag treats each line's start and end as anchors.
The reference panel lists classes, anchors, quantifiers and groups with examples.
The NER Annotator has a regex box for that; test the pattern here first.