FREE REGULAR EXPRESSION TESTER

Regex Tester Online.

Test and debug JavaScript regular expressions with VeltoGen's regex tester online. This free regex checker highlights matching text, displays match positions, and helps you understand numbered and named capture groups. Use our online regex tool with live updates, flag controls, practical samples and exportable results.

✓ Live Regex Testing ✓ Match Highlights ✓ Capture Groups & Flags
01 Enter Regex Pattern and flags
02 Test Pattern Inspect sample text
03 Review Matches Copy or download
REGEX TESTER WORKSPACE JAVASCRIPT REGEXP · LIVE RESULTS
STEP 01 · BUILD YOUR REGEX

Test a Regular Expression

Enter a JavaScript regex pattern, select matching flags and test the expression against your own sample text.

REGEX PATTERN

Enter Your Pattern

Type the expression only. Do not include surrounding slash characters.

.*
13 / 1,000 UTF-16 units

Example: \d+ matches one or more digits. Choose flags below.

REGULAR EXPRESSION FLAGS

Customize Regex Matching

Toggle flags to change how JavaScript matches the sample text.

gi

Unicode u and Unicode sets v cannot be selected together. The availability of newer regex features depends on your browser.

STEP 02 · SAMPLE TEXT

Test String Editor

Paste the text to search. Results refresh automatically after a short typing pause.

51 / 20,000 UTF-16 units

The tester shows up to 500 matches. Match offsets use JavaScript UTF-16 indices.

Try an Example
STEP 03 · TEST REGEX

Inspect Your Matches

Live results update automatically. Use Test Regex to jump directly to the results panel.

Regex matching runs in browser JavaScript. Avoid patterns that may cause excessive backtracking.

LIVE REGEX RESULTS

Match Results

Review highlighted text, exact positions and captured groups.

LIVE TEST
TOTAL MATCHES 0
CAPTURE GROUPS 0
ACTIVE FLAGS g

Highlighted Text

Matching text in teal
Match highlighting will appear here.

Match Details

Zero-based offsets · End exclusive

Match offsets use JavaScript UTF-16 string indices. Zero-length matches appear in details but have no visible highlight. Expensive patterns may block the browser thread.

ABOUT THE TOOL

Regex Tester Online — Free JavaScript Regex Checker

A regular expression, also called regex, is a pattern used to find particular sequences of characters inside text. Developers use regular expressions for searching, parsing log messages, extracting fields and checking text patterns.

VeltoGen's regex tester online allows you to test patterns against editable sample text using the JavaScript RegExp engine in your browser. Results refresh after a short typing pause.

This regex checker highlights the matching text and shows each match's start and end positions. It also displays numbered and named capture groups when your expression contains them.

With our online regex tool, you can enable global, case-insensitive, multiline, dotAll, Unicode, sticky and match-indices flags. Practical samples help you learn common matching techniques, and the results can be copied or downloaded for reference.

HOW IT WORKS

How to Test Regex Online

Test regular expressions and inspect matching text in four simple steps.

  1. Enter a Regular Expression

    Type the regex pattern without surrounding slash characters.

  2. Choose Regex Flags

    Enable global, ignore case, multiline and other supported flags.

  3. Enter Sample Text

    Paste text or load an example. Matching updates automatically after a short pause.

  4. Review and Export Matches

    Inspect highlighted matches, zero-based offsets, capture groups and the downloadable match report.

REGEX TESTER FEATURES

Features of Our Online Regex Tool

Live testing, match highlighting, flag selection and capture group inspection.

.*

Live Regex Testing

Results update after a 250ms typing pause, without requiring a button click.

Aa

Highlighted Matches

See matching text highlighted without inserting user-supplied HTML into the page.

#

Match Start and End

Inspect zero-based UTF-16 offsets for each matched string.

()

Named and Numbered Groups

View captured values, including named captures and unmatched optional groups.

gi

Eight Regex Flags

Choose JavaScript RegExp flags, including Unicode and sticky matching modes.

↓

Copy and Download Results

Copy the regex or matched text report and download match details as a text file.

PRACTICAL ADVANTAGES

Benefits of Using a Regex Checker

Understand regex patterns, troubleshoot matching and learn from examples.

01

Debug Regular Expressions Faster

Experiment with regex patterns and immediately inspect which text they match.

02

Learn Regex with Examples

Try practical patterns for email-like strings, phone-like text, dates and capture groups.

03

Understand Captured Values

Inspect exact match positions and separately captured text without guessing.

04

Test Patterns in Your Browser

Use the browser’s JavaScript regex engine without installing a separate developer tool.

COMMON USE CASES

Why and When to Use a Regex Tester

Useful for text searches, structured data extraction, debugging and learning.

TEXT SEARCH

Find Patterns in Text

Test word, number and punctuation patterns against your own sample strings.

DATA EXTRACTION

Extract Dates and Identifiers

Use capture groups to identify parts of structured text and log messages.

DEVELOPER DEBUGGING

Inspect Regex Flags

Compare matching behavior with case-insensitive, multiline or Unicode flags.

LEARNING

Practice JavaScript RegExp

Understand metacharacters, quantifiers, anchors and named groups through live examples.

PRACTICAL REGEX EXAMPLES

Regex Pattern Examples and Common Tokens

Learn what different regular expressions match and how JavaScript regex syntax works.

Example 1 — Find All Numbers REGEX PATTERN
\d+
FLAGS
g
SAMPLE TEXT
Order 125 contains 3 items.
MATCHED VALUES
125
3

The \d+ pattern finds digit sequences. Global mode returns successive matching sequences.

Example 2 — Named Date Capture Groups REGEX PATTERN
(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})
SAMPLE TEXT
Release: 2026-10-14
CAPTURED VALUES
year: 2026
month: 10
day: 14

Named capture groups separate matching text into readable fields. This example checks a date-like structure, not whether the date exists in the calendar.

JavaScript Regex Syntax Reference

Token Meaning Example
\d ASCII digit \d+
\w Word character \w+
\s Whitespace \s+
. Any character except line terminators unless s is enabled a.b
^ and $ Start and end anchors; m changes their line behavior ^Hello$
[abc] Character class [aeiou]
* + ? Quantifiers \d+
{n,m} Repetition range \d{2,4}
(...) Numbered capture group (\d{4})
(?<name>...) Named capture group (?<year>\d{4})
\b Word boundary \bcat\b
g / i / m Global / ignore case / multiline hello with gi
COMPLETE REGEX TESTING GUIDE

Understanding Regular Expressions and Matches

Learn JavaScript regex matching behavior, flags, positions, capture groups and limitations.

01

What Is a Regular Expression?

A regular expression, or regex, describes a pattern that can identify matching portions of text. Developers use regex to search logs, identify repeated structures and extract parts of strings.

A regex matching a sample does not necessarily validate an entire data format.
02

Using the JavaScript Regex Engine

This regex checker uses the RegExp engine provided by the current browser. Some pattern syntax and flags differ between JavaScript, Python and PCRE.

Enter the pattern without surrounding slashes and select flags separately.
03

Understanding Global and Sticky Matching

The g flag searches for successive matches. The y flag requires each following match to begin exactly where the previous search ended, starting from position zero in this tool.

Sticky matching may find fewer results than global matching.
04

Reading Match Offsets and Highlights

The tester shows each match with zero-based start and exclusive end offsets. These positions use UTF-16 units, which means some Unicode characters occupy two positions.

Zero-length matches have result entries but cannot highlight visible characters.
05

Working with Capture Groups

Parentheses can capture parts of a larger regex match. Named groups add readable labels, such as year, month and day, that appear in the match details.

Unmatched optional groups are displayed separately from empty captured strings.
06

Testing Real-World Text Patterns

Patterns can help find email-like text, date-like strings and phone-like numbers. However, short demonstration patterns cannot establish complete semantic validity or account for every international format.

Test valid, invalid and unexpected cases before using a pattern in production.
07

Regex Performance and Input Limits

This tool accepts up to 1,000 UTF-16 units in a pattern, 20,000 in sample text and displays at most 500 matches. Some patterns can still cause excessive backtracking and block the browser thread.

Avoid untrusted regex patterns; input limits do not guarantee a safe execution time.

Browser-Based JavaScript Regex Testing

Patterns and sample text are processed locally using the browser's RegExp engine. This component does not intentionally send them to an external regex API.

Some regular expressions can cause catastrophic backtracking. The input size and match limits do not provide a guaranteed execution timeout. Use caution with unfamiliar patterns.

QUESTIONS & ANSWERS

Frequently Asked Questions

Find answers about regex syntax, matching flags, capture groups, JavaScript behavior and common testing issues.

What is a regex tester online?

A regex tester online lets you enter a regular expression and sample text to check where the pattern matches. VeltoGen uses your browser’s JavaScript RegExp engine and displays matched text, positions and capture groups.

How do I use this regex checker?

Enter a regex pattern without surrounding slashes, choose the flags and paste sample text. Matches update automatically after a short pause. Click Test Regex to move to the results.

Is VeltoGen a free online regex tool?

Yes. VeltoGen Regex Tester is free to use in your browser without installing software or creating an account.

Which regex engine does this tool use?

The tool uses the JavaScript RegExp implementation in your current browser. JavaScript regex behavior can differ from Python, PCRE and other regular expression engines.

Do I need to type slashes around a regex?

No. Enter the pattern alone, such as \d+. Use the flag checkboxes instead of entering a regex literal such as /\d+/g.

What does the g flag mean in regex?

The global g flag enables successive matches throughout the sample text. Without g or y, this tool shows only the first match.

What does the i flag do?

The i flag enables case-insensitive matching. A pattern such as hello can then match Hello and HELLO where supported by JavaScript regex case-folding rules.

What does the m flag do in regex?

The multiline m flag changes the behavior of the ^ and $ anchors so they can match line boundaries, not only the beginning and end of the entire string.

What does the s flag do?

The dotAll s flag allows a dot to match line terminators as well as other characters.

Can I use Unicode regex flags?

Yes, when supported by the browser. The u flag enables Unicode-aware matching, while v enables Unicode sets features. The tool does not allow u and v to be selected together.

What does the y sticky flag mean?

The sticky y flag requires the next match to begin exactly at the current lastIndex. This tester starts at index zero, so a sticky expression may return no matches even if matching text appears later.

What does the d flag mean?

The d flag asks the JavaScript regex engine to provide match indices. This tool displays overall match start and end positions in its results.

Can the regex tester show capture groups?

Yes. The results show the numbered capture groups for each match, including groups that did not participate in the match.

Can I test named capture groups?

Yes. JavaScript named capture groups, such as (?<year>\d{4}), appear with their names and captured values in the result details.

How are regex match positions counted?

Match positions use zero-based JavaScript UTF-16 string offsets. End positions are exclusive, meaning they point immediately after the matched text.

Why does my regex return no matches?

Check your pattern, flags, case sensitivity, whitespace and anchors. If the sticky flag is active, the pattern must match at the current position.

How does the tool handle zero-length matches?

Zero-length matches are included in the details. The tool advances the regex position to avoid an infinite result loop, but an empty match has no visible highlighted characters.

Can a regular expression freeze the browser?

Yes. Some patterns cause catastrophic backtracking and may block the browser’s JavaScript thread. Input and result limits do not guarantee a safe execution time. Avoid untrusted or expensive patterns.

Does the email regex sample validate every real email?

No. The email, phone and date examples demonstrate matching behavior. They are not complete validators for all real-world email addresses, phone numbers or calendar dates.

Can I copy or download regex match results?

Yes. You can copy the pattern, copy a readable match report or download the match report as a UTF-8 text file after results are found.