How to use Regular Expression Tester
- Enter original text and a JavaScript regular expression to perform match, extract, or replace operations.
- Enter 0 (full match) or group index when extracting; enter replacement template when replacing.
- Inspect match locations and updated outputs before copying or downloading. Timed-out requests will halt automatically without forcing continuation.
Try a concrete example
Use FAN-(\d+) to find FAN-001 and FAN-002. Group 1 extracts 001 and 002; replacement EC-$1 yields EC-001 and EC-002.
How to interpret results
Use JavaScript RegExp syntax and separate flags. Execution stops after one second. Input is limited to 200,000 characters and patterns to 2,000. Preview limits do not silently truncate replacements; total output is bounded. Matches do not establish business validity.
Frequently asked questions
Do I need to include slashes on both ends?
Enter only the expression body (e.g., \d+); flags are entered separately.
Why did only the first match register?
Check whether the g flag is enabled.
Can regex fully parse HTML from any arbitrary webpage?
Not recommended; complex HTML should be parsed using a proper parser.