• Omnilude ToolsCollection of Online Tools
  • Home
Online Tools
  • Developer Tools
    • UUID Generator
    • Timestamp Converter
    • Encoder/Decoder
    • Color Picker
    • Regex Tester
    • Data Converter
    • Hash Generator
    • Cron Expression
    • Naming Convention
    • JWT Debugger
    • Browser Info
    • Number Base
    • Meta Tag Generator
    • Password
  • Text Tools
  • Useful Tools
  • Time Tools
  • Calculator Tools

Regex Tester

Test regular expressions

Updates

Recently shipped improvements

New
Change theme
Light Mode
Dark Mode
System

Regex Pattern

/
/g

Test String

Replace

Common Patterns

[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
https?://[\w\-._~:/?#[\]@!$&'()*+,;=%]+
0\d{1,2}-\d{3,4}-\d{4}
\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}
\d{4}-\d{2}-\d{2}
\d+
[a-zA-Z]+
<[^>]+>

Cheatsheet

Character Classes
. - Any character
\d - Digit [0-9]
\w - Word char [a-zA-Z0-9_]
\s - Whitespace
Quantifiers
* - 0 or more
+ - 1 or more
? - 0 or 1
{n} - Exactly n times
{n,m} - n to m times
Anchors
^ - Start of string
$ - End of string
\b - Word boundary
Groups
(abc) - Capture group
(?:abc) - Non-capture group
a|b - OR operation

What is Regex Tester?

Regex Tester is an interactive online tool that allows you to write, test, and debug regular expressions in real time. Regular expressions (regex) are powerful pattern-matching sequences used in programming, text processing, and data validation. This tool provides instant visual feedback by highlighting matches, displaying capture groups, and supporting string replacement — making it an indispensable companion for developers, data analysts, and anyone working with text patterns.

  • Real-time pattern matching and highlighting
  • Supports g (global), i (ignoring case), m (multiline), and s (dotAll) flags.
  • String replacement with capture-group references such as $1 and $2
  • Provides matching details (matching location, capture group, etc.)
  • Frequently used regular expression pattern templates (email, URL, phone number, etc.)
  • Built-in regular expression syntax cheat sheet

How to Use

  1. 1

    Enter regular expression pattern

    Enter the regular expression pattern you want to test in the top input box. For example, you can create a pattern for email validation or a pattern for extracting specific strings.

  2. 2

    Set Flags

    Enable the g (global search), i (ignore case), m (multiline), and s (dotAll) flags as needed. Matching behavior varies depending on the flag combination.

  3. 3

    Enter test string

    Enter the target string to check with a regular expression. As soon as you input, the matched part is highlighted so you can check the results in real time.

  4. 4

    Check matching results

    Check detailed information such as the number, location, and capture group of matched strings. If necessary, you can also preview the substitution results by entering the substitution string.

  5. 5

    Use cheat sheets and templates

    If you don't remember the regular expression syntax, you can refer to the built-in cheat sheet and quickly apply frequently used pattern templates by clicking on them.

Frequently Asked Questions

Without the g(global) flag, it will just look for the first match and stop, but with the g flag enabled, it will find all matches throughout the string. When replacing, the g flag is also required so that all matches are replaced.

The part enclosed in parentheses () becomes the capture group. When making substitutions, $1 refers to the matching value of the first group and $2 refers to the matching value of the second group. For example, you can reverse the date format by substituting $2/$1 in the pattern (\d{4})-(\d{2}).

The m(multiline) flag causes ^ and $ to match the start/end of each line rather than the start/end of the entire string. This is useful when you need to apply a pattern line by line in multi-line text.

In regular expressions, characters with special meaning (. * + ? ^ $ [ ] { } ( ) | \) must be preceded by a backslash (\) to match them as literals. For example, to find a period, write \.

By default, the . (dot) matches any character except the newline character (\n). Enabling the s flag causes . to match any character, including a newline character, which is necessary when processing patterns that span multiple lines.

Tips & Best Practices

  • Use frequently used pattern templates, such as email, URL, and phone number, to get started quickly without having to write them from scratch.
  • For complex regular expressions, use non-capturing groups (?:...) to avoid unnecessary captures and improve performance.
  • When greedy matching (*, +) catches more characters than expected, try using lazy matching (*?, +?).
  • Use \b (word boundary) to match whole words accurately and prevent partial matches.
  • In the substitution function, you can also utilize special variables such as $& (full matching), $` (before matching), and $' (after matching).
  • When writing regular expressions, you can make debugging easier by starting with simple patterns and gradually building them up in complexity.

Omnilude Tools

A free collection of online tools for developers, designers, and creators. All data is processed locally in your browser.

Developer Tools

  • UUID Generator
  • Timestamp Converter
  • Encoder/Decoder
  • Color Picker

Text Tools

  • JSON Editor
  • Text Compare
  • Text Counter
  • Markdown

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 Omnilude. All rights reserved.

Send feedback