Explore all Text & Data Tools

Regex Tester & Debugger – Test Regular Expressions Online

Test and debug JavaScript regular expressions in real time with visual match highlighting, capture groups breakdown, and syntax cheat sheet.

Smart Regex Generator from Requirement:
Enter prompt in English or Vietnamese
⚡ Quick Prompts:
RunMacro Preset Library (24+):
//gim
Flags:
Visual Matches Highlight:2 matches
Liên hệ hỗ trợ: support@runmacro.app hoặc billing@runmacro.com. Hotline giải đáp: 0988123456 hoặc +84912345678. Mã OTP kích hoạt của bạn là 852109, hết hạn lúc 14:30. Tổng hóa đơn: 250,000 đ, chiết khấu $15.50. Gói dịch vụ "Doanh nghiệp Pro". Đơn hàng #RM-9821, mã định danh: 6ba7b810-9dad-11d1-80b4-00c04fd430c8.
Captured Matches & Groups (2):
#IndexFull MatchCapture Groups
#116support@runmacro.app
$1: support$2: runmacro.app
#242billing@runmacro.com
$1: billing$2: runmacro.com
RunMacro Bot
⚡ Automated Regex Scraping

Automate Regex Scraping & Data Pipeline Routing

Tested your regular expression? Now deploy it to extract invoice numbers, emails, and tracking codes from live windows.

How to Test Regular Expressions Online

1

Enter Regex Pattern and Flags

Type your regular expression into the pattern input bar and select appropriate flags like global (g) or ignoreCase (i).

2

Paste Text to Inspect Matches

Paste your sample data into the Test String box. Matches will instantly light up in yellow/neon highlights.

3

Review Groups and Copy Results

Inspect the captured groups table below to view exact group values ($1, $2) and copy all matches with one click.

Essential Regular Expression Patterns & Syntax Reference

Quick reference table of essential JavaScript regex tokens, quantifiers, capture groups, and production-tested patterns for web scraping and data validation:

CategoryPattern / SyntaxDescriptionExample Match
Character Classes\d, \w, \sMatches any digit (0-9), word character (a-z, A-Z, 0-9, _), or whitespace (space, tab, newline).\d+ matches "2024", \w+ matches "run_macro"
Quantifiers*, +, ?, {n,m}Matches 0 or more (*), 1 or more (+), 0 or 1 (?), or between n and m occurrences.a{2,4} matches "aa", "aaa", "aaaa"
Anchors & Boundaries^, $, \b^ asserts line start, $ asserts line end, \b asserts word boundary.^\d+$ matches whole line containing digits only
Capture Groups(abc), (?:abc)Parentheses group tokens together; captures content into $1, $2, or creates non-capturing group with (?:...).(\w+)@(\w+) extracts username & domain prefix
Common Pattern: Email([a-zA-Z0-9._%+-]+)@([a-zA-Z0-9.-]+\.[a-zA-Z]{2,})Standard RFC-friendly pattern to validate and extract email user & domain parts.user@runmacro.app (Group 1: user, Group 2: runmacro.app)
Common Pattern: URLhttps?:\/\/[^\s$.?#].[^\s]*Matches HTTP and HTTPS URLs for web scraping and link extraction.https://runmacro.app/en/tools/
Common Pattern: Date (ISO)\b\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])\bValidates standard YYYY-MM-DD format with month and day boundary enforcement.2026-03-31
Common Pattern: Price/Currency\$?(\d{1,3}(,\d{3})*(\.\d{2})?)Parses monetary amounts with optional dollar sign, comma thousands, and cents.$1,499.00 or 250.50

Key Capabilities of Regex Tester

Real-Time Match Highlights

Visual marks instantly highlight matching text strings as you type.

Capture Group Breakdown

Inspect full matches alongside numbered capture groups ($1, $2...) in a structured table.

Built-in Syntax Cheat Sheet

Quickly reference character classes, quantifiers, anchors, and lookarounds.

Ready-to-Use Presets

One-click presets for common expressions including Email, URL, Hashtag, and Date patterns.

Frequently Asked Questions

Clear answers about using this tool and automating workflows with RunMacro.

Which regular expression engine does this tool use?

The tool uses the native ECMAScript / JavaScript RegExp engine built into modern web browsers, supporting standard character classes, quantifiers, lookaheads, lookbehinds, and capture groups.

What are Capture Groups in regular expressions?

Capture groups are defined by enclosing parts of your regex pattern in parentheses `(...)`. They allow you to extract specific substrings (accessible via $1, $2, etc.) from matched patterns during parsing or string replacement operations.

What does the "g" (global) flag do?

The global flag (`g`) instructs the regex engine to search for all matching occurrences throughout the entire input string rather than stopping after the first match.

How does RunMacro utilize regex in web automation?

RunMacro Web Automation uses regular expressions within Smart Selectors to extract dynamic text strings, parse order numbers, validate input fields, and sanitize scraped HTML data before saving to spreadsheets.

Related Free Tools

Explore other helpful browser-based utilities in the same category.