About this tool
Test a supported JavaScript regular expression against sample text and inspect its matches or capture groups. Use a manageable sample while reviewing flags and potentially expensive patterns before applying them to large data.
Calculations and file processing run in this browser tab. The tool does not send working inputs or files to our hosting server.
मुख्य इनपुट और नियंत्रण हिंदी में देखने के लिए ऊपर “🇮🇳 हिंदी में देखें” चुनें। गणना और फ़ाइल प्रोसेसिंग इसी ब्राउज़र टैब में होती है; टूल आपके इनपुट हमारी होस्टिंग पर नहीं भेजता।
Features
- Work with Regex Pattern (Without surrounding slashes); Sample Text to Test Against.
- Regex Flags: choose from g (Global — Find All); gi (Global + Case-Insensitive); gm (Global + Multiline).
- Review Total Matches; Compiled Regex in the result breakdown.
Benefits
- Inspect which text a pattern actually matches.
- Compare capture groups and matching flags while drafting a regex.
Who should use this tool?
- Developers refining a pattern.
- People learning regular-expression matching.
How to use
- Complete the labelled fields for your scenario, including Regex Pattern (Without surrounding slashes); Sample Text to Test Against. Use the units shown beside each field.
- Choose Regex Flags to match the situation you want to check.
- Select Calculate / Run Tool and review Regex Match Results (3 Match(es) Found) and Total Matches; Compiled Regex.
- Check the assumptions and limitations below. Adjust a value to compare scenarios, then copy or download the result you need.
Try these worked examples
| Scenario | Example inputs | Example result |
|---|---|---|
| Match 6-Digit Indian PIN Codes (110001, 400001, 560001) | Regex Pattern (Without surrounding slashes): \b[1-9][0-9]{5}\bRegex Flags: g (Global — Find All)Sample Text to Test Against: Deliveries to New Delhi 110001, Mumbai 400001, and Bengaluru 560001. | 110001, 400001, 560001 |
| Match Indian IFSC Codes (e.g. SBIN0001234, HDFC0000123) | Regex Pattern (Without surrounding slashes): \b[A-Z]{4}0[A-Z0-9]{6}\bRegex Flags: g (Global — Find All)Sample Text to Test Against: Transfer to SBIN0001234 or HDFC0000123. | SBIN0001234, HDFC0000123 |
Reference and processing
ECMA-262 Regular Expression Grammar · Listed applicability: 2025-2026
Calculations and file processing run in this browser tab. The tool does not send working inputs or files to our hosting server.
FAQs
Will every valid regex run quickly on a large input?
Some patterns can require substantial processing even when syntactically valid. Test with an appropriate sample and review performance before applying a pattern to large or untrusted input.
Which inputs do I need for Regular Expression (Regex) Live Tester & Capture Group Inspector?
Use Regex Pattern (Without surrounding slashes); Regex Flags; Sample Text to Test Against. The built-in examples show how those fields fit together.
What should I check before using this result?
Catches invalid regex syntax safely. Check the assumptions and output against your intended task before relying on the result.
What happens to the information I enter?
Calculations and file processing run in this browser tab. The tool does not send working inputs or files to our hosting server. Tool favourites save only tool IDs in this browser. Sharing sends the tool link, not your working values or files.