Live Regex Testing
Results update after a 250ms typing pause, without requiring a button click.
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.
Enter a JavaScript regex pattern, select matching flags and test the expression against your own sample text.
Type the expression only. Do not include surrounding slash characters.
Example: \d+ matches one or more digits. Choose flags below.
Toggle flags to change how JavaScript matches the sample text.
Unicode u and Unicode sets v cannot be selected together. The availability of newer regex features depends on your browser.
Paste the text to search. Results refresh automatically after a short typing pause.
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.
Review highlighted text, exact positions and captured groups.
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.
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.
Test regular expressions and inspect matching text in four simple steps.
Type the regex pattern without surrounding slash characters.
Enable global, ignore case, multiline and other supported flags.
Paste text or load an example. Matching updates automatically after a short pause.
Inspect highlighted matches, zero-based offsets, capture groups and the downloadable match report.
Live testing, match highlighting, flag selection and capture group inspection.
Results update after a 250ms typing pause, without requiring a button click.
See matching text highlighted without inserting user-supplied HTML into the page.
Inspect zero-based UTF-16 offsets for each matched string.
View captured values, including named captures and unmatched optional groups.
Choose JavaScript RegExp flags, including Unicode and sticky matching modes.
Copy the regex or matched text report and download match details as a text file.
Understand regex patterns, troubleshoot matching and learn from examples.
Experiment with regex patterns and immediately inspect which text they match.
Try practical patterns for email-like strings, phone-like text, dates and capture groups.
Inspect exact match positions and separately captured text without guessing.
Use the browser’s JavaScript regex engine without installing a separate developer tool.
Useful for text searches, structured data extraction, debugging and learning.
Test word, number and punctuation patterns against your own sample strings.
Use capture groups to identify parts of structured text and log messages.
Compare matching behavior with case-insensitive, multiline or Unicode flags.
Understand metacharacters, quantifiers, anchors and named groups through live examples.
Learn what different regular expressions match and how JavaScript regex syntax works.
\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.
(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2}) SAMPLE TEXT Release: 2026-10-14 CAPTURED VALUES year: 2026
month: 10
day: 14Named capture groups separate matching text into readable fields. This example checks a date-like structure, not whether the date exists in the calendar.
| 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 |
Learn JavaScript regex matching behavior, flags, positions, capture groups and limitations.
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.
This regex checker uses the RegExp engine provided by the current browser. Some pattern syntax and flags differ between JavaScript, Python and PCRE.
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.
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.
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.
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.
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.
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.
Find answers about regex syntax, matching flags, capture groups, JavaScript behavior and common testing issues.
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.
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.
Yes. VeltoGen Regex Tester is free to use in your browser without installing software or creating an account.
The tool uses the JavaScript RegExp implementation in your current browser. JavaScript regex behavior can differ from Python, PCRE and other regular expression engines.
No. Enter the pattern alone, such as \d+. Use the flag checkboxes instead of entering a regex literal such as /\d+/g.
The global g flag enables successive matches throughout the sample text. Without g or y, this tool shows only the first match.
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.
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.
The dotAll s flag allows a dot to match line terminators as well as other characters.
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.
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.
The d flag asks the JavaScript regex engine to provide match indices. This tool displays overall match start and end positions in its results.
Yes. The results show the numbered capture groups for each match, including groups that did not participate in the match.
Yes. JavaScript named capture groups, such as (?<year>\d{4}), appear with their names and captured values in the result details.
Match positions use zero-based JavaScript UTF-16 string offsets. End positions are exclusive, meaning they point immediately after the matched text.
Check your pattern, flags, case sensitivity, whitespace and anchors. If the sticky flag is active, the pattern must match at the current position.
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.
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.
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.
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.