Enter your regex pattern in the input field and set the flags (g, i, m, s, u, y) as needed. Type or paste a test string below the pattern to see matches highlighted in real time. The tool instantly breaks down every token in your pattern and shows what each part does. Click "Explain with AI" for a natural-language walkthrough of your entire expression.
Pastefix's Regex Tester validates your regular expression, parses it into individual tokens with human-readable descriptions, and tests it against your input string — all in real time. It shows match results with capture groups so you can iterate on patterns without leaving the page.
Pastefix uses JavaScript's native RegExp engine, which supports all modern flags including dotAll (s), unicode (u), and sticky (y). Patterns are tested exactly as they would run in a browser or Node.js environment.
Enter a multi-line test string — each line is tested individually against your pattern. The global (g) flag finds all matches within each line.
No. Pattern testing and token analysis happen entirely in your browser. Only clicking "Explain with AI" sends data to a server for analysis.
No. Unlike writing regex in code, you do not need to escape slashes in the pattern input — just type the pattern directly.