regexregular-expressionsdeveloper-tools

Regex Tester Online - Test Regular Expressions in Real Time

Rafael Andrade

By Rafael Andrade· Desenvolvedor

·2 min read

An online regex tester shows you exactly which parts of a string your regular expression matches - with live highlighting and captured group details - making pattern building intuitive instead of frustrating.

What is a Regular Expression?

A regular expression (regex) is a sequence of characters that defines a search pattern. Regex is used in virtually every programming language and text editor for:

How to Use the Regex Tester

  1. Open the Regex Tester on UtilWave.
  2. Enter your regular expression in the Pattern field (without slashes).
  3. Select your flags: g (global), i (case-insensitive), m (multiline), or s (dot-all).
  4. Type or paste your test string in the Test String area.
  5. Matches are highlighted instantly. The panel below shows each match, its position, and any captured groups.
  6. The match count updates in real time as you type.

Common Regex Patterns

Email validation

[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}

US phone number

\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}

ISO date (YYYY-MM-DD)

\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])

Extract URLs from text

https?://[^\s]+

Match hex color codes

#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\b

Understanding Regex Flags

| Flag | Meaning | |---|---| | g | Find all matches, not just the first | | i | Case-insensitive matching | | m | ^ and $ match line boundaries, not just string boundaries | | s | Dot (.) matches newline characters as well |

FAQ

Which regex flavor does this tool use? The tester uses JavaScript's built-in RegExp engine, which is ECMAScript-standard. It supports lookaheads, lookbehinds (ES2018+), named capture groups, and Unicode properties.

How do I reference a captured group? In the match results panel, each group is numbered starting from 1. Named groups ((?<name>...)) appear with their name.

What does the ^ anchor do? ^ matches the start of the string (or line with the m flag). It does not mean "not" when used at the start of the pattern - it only means "not" when used inside a character class [^...].

Can I test multiline strings? Yes - paste a multiline string into the test area and use the m flag to match line boundaries.

Build and debug patterns instantly with the free Regex Tester.

Related tool

Regex Tester

Free to use, no sign-up.