JSON Formatter & Validator (Beautify, Minify & Validate)
Beautify messy JSON payloads, validate syntax errors with exact line/column indicators, and minify for production.
Open ToolTest and debug JavaScript regular expressions in real time with visual match highlighting, capture groups breakdown, and syntax cheat sheet.
| # | Index | Full Match | Capture Groups |
|---|---|---|---|
| #1 | 16 | support@runmacro.app | $1: support$2: runmacro.app |
| #2 | 42 | billing@runmacro.com | $1: billing$2: runmacro.com |

Tested your regular expression? Now deploy it to extract invoice numbers, emails, and tracking codes from live windows.
Type your regular expression into the pattern input bar and select appropriate flags like global (g) or ignoreCase (i).
Paste your sample data into the Test String box. Matches will instantly light up in yellow/neon highlights.
Inspect the captured groups table below to view exact group values ($1, $2) and copy all matches with one click.
Quick reference table of essential JavaScript regex tokens, quantifiers, capture groups, and production-tested patterns for web scraping and data validation:
| Category | Pattern / Syntax | Description | Example Match |
|---|---|---|---|
| Character Classes | \d, \w, \s | Matches 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: URL | https?:\/\/[^\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])\b | Validates 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 |
Visual marks instantly highlight matching text strings as you type.
Inspect full matches alongside numbered capture groups ($1, $2...) in a structured table.
Quickly reference character classes, quantifiers, anchors, and lookarounds.
One-click presets for common expressions including Email, URL, Hashtag, and Date patterns.
Clear answers about using this tool and automating workflows with RunMacro.
The tool uses the native ECMAScript / JavaScript RegExp engine built into modern web browsers, supporting standard character classes, quantifiers, lookaheads, lookbehinds, and capture groups.
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.
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.
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.
Explore other helpful browser-based utilities in the same category.