Regex Tester (Matches, Groups, and Replacement Pyfirferð)

Need to run a regex test quickly? Paste and verify immediately with this regex tester.

See highlighted matches, capture groups, and replacement úttak in one skjár.

Your inntak is processed locally in the browser and is not sent to a server.

How to use

  1. Enter a pattern and choose the flags you need (g/i/m).
  2. Paste source text. If auto-run is ON, niðurstaðas update immediately.
  3. Use the match list to inspect locations and jump to each match.
  4. Use Groups and Replacement tabs to verify captures and replacement úttak.

Examples

Email extraction

Inntak: Text containing email addresses

Úttak: Highlighted matches and start/end positions

key=value replacement

Inntak: Multi-line key=value text

Úttak: Replacement úttak using $1 and $2

Skrá line filter

Inntak: Skrá text with INFO / WARN / ERROR

Úttak: Line-based matching with m flag

Replacement Cheat Sheet

  • $1, $2 ... : capture group references
  • $& : whole match
  • $` : before match / $' : after match

Note

  • This verkfæri evaluates patterns using JavaScript (ECMAScript) regular expressions.
  • Some PCRE features (such as atomic groups) are not available.
  • Even JavaScript features can vary by runtime environment.
  • Niðurstaðas are not guaranteed to be identical to PCRE.

Algengar spurningar

What are g/i/m flags?

Use checkboxes to toggle them. (g=global, i=ignore case, m=multiline)

Can I test replacement too?

Yes. Enter a replacement string and check the Replacement tab. Group references like $1 are supported.

How is this different from PCRE?

This verkfæri uses JavaScript regular expressions. Because of spec differences, the same pattern may produce different niðurstaðas from PCRE.