Interactive online Regular Expression (Regex) tester & debugger. Test patterns with real-time visual highlights, capture group breakdown, substitution & find-replace, ReDoS safety timer, and multi-language code export.
⚡ Interactive Calculation Engine Active
Please enable JavaScript in your browser to run live computations, 2D envelope diagrams, and export PDF reports.
How to Use Regex Tester
Enter your regular expression pattern in the input field without leading or trailing slashes.
Configure regex flags: Global (g), Case-Insensitive (i), Multiline (m), DotAll (s), and Unicode (u).
Type or paste your test subject text into the subject textarea.
Inspect highlighted matches in the visual highlight viewer and check capture group extractions in the match breakdown drawer.
Switch to the "Find & Replace" tab to preview string substitutions using $1, $2, or
Toolique | Free Online Tools for Work, Engineering, Finance & More
template variables in real-time.
Click "Export Code" to generate ready-to-run snippets in JavaScript/TypeScript, Python, Go, or PHP.
Quick Regex Syntax & Token Reference
Common regular expression tokens:
- `\d`: Any digit (0-9) | `\D`: Any non-digit
- `\w`: Any word character (alphanumeric plus underscore) | `\W`: Non-word character
- `\s`: Any whitespace (space, tab, newline) | `\S`: Non-whitespace
- `.`: Any character except newline (unless flag `s` is active)
- `^`: Beginning of string/line | `
Regex Tester | TooliqueRegex Tester | Toolique
` and `
: End of string/line
- `\b`: Word boundary assertion | `\B`: Non-word boundary
- `*`: 0 or more occurrences | `+`: 1 or more occurrences | `?`: 0 or 1 occurrence (optional)
- `{n,m}`: Between n and m occurrences
Find & Replace Template Variables
When performing substitutions, use standard replacement template operators:
- `$1`, `$2`, ... `$n`: Inserts the nth captured group.
- `
Toolique | Free Online Tools for Work, Engineering, Finance & More
`: Inserts the entire matched string.
- `
Regex Tester | TooliqueRegex Tester | Toolique
` and `
`: Inserts the text preceding the matched substring.
- `
` insert the text preceding and following the match respectively. For example, replacing `(\\w+)\\s(\\w+)` with `$2, $1` transforms \"John Doe\" into \"Doe, John\"."
}
},
{
"@type": "Question",
"name": "What is Catastrophic Backtracking (ReDoS)?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Regular Expression Denial of Service (ReDoS) occurs when nested quantifiers (such as `(a+)+
Regex Tester | Toolique
) cause the regex engine to explore exponentially many permutations when attempting to match non-matching strings. Toolique safeguards your browser by enforcing execution safety limits and tracking execution time in milliseconds."
}
},
{
"@type": "Question",
"name": "What are standard regular expressions for Indian identification and billing?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Indian business and government compliance patterns: PAN Card: `^[A-Z]{5}[0-9]{4}[A-Z]{1}
Regex Tester | Toolique
; GSTIN: `^\\d{2}[A-Z]{5}\\d{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}
Regex Tester | Toolique
; Indian 10-digit mobile: `^(?:\\+91|91|0)?[6-9]\\d{9}
Regex Tester | Toolique
; Indian PIN Code: `^[1-9][0-9]{5}
Regex Tester | Toolique
; Formatted Aadhaar: `^[2-9]{1}[0-9]{3}\\s[0-9]{4}\\s[0-9]{4}
Regex Tester | Toolique
."
}
}
]
},
{
"@type": "Organization",
"@id": "https://www.toolique.in/#organization",
"name": "Toolique",
"url": "https://www.toolique.in",
"logo": "https://www.toolique.in/favicon-512x512.png",
"foundingDate": "2026-06-16",
"description": "Toolique is a premium, free, privacy-focused online suite of interactive calculators, developer converters, and programming academy tools operating completely in the browser.",
"contactPoint": {
"@type": "ContactPoint",
"contactType": "customer support",
"email": "support@toolique.in"
},
"founder": {
"@type": "Person",
"@id": "https://www.toolique.in/about-founder#person"
},
"sameAs": [
"https://github.com/ajinkyaswami1999",
"https://www.linkedin.com/in/ajinkya-swami-82751b191/",
"https://www.instagram.com/ajinkyaswami.in/",
"https://voxelique.com",
"https://www.instagram.com/voxelique/"
]
},
{
"@type": "Person",
"@id": "https://www.toolique.in/about-founder#person",
"name": "Ajinkya Swami",
"jobTitle": "Founder & Software Architect",
"image": "https://www.toolique.in/favicon-512x512.png",
"description": "Ajinkya Swami is a QA Automation Engineer, Full-Stack Developer, and founder of Toolique and Voxelique, specializing in custom desktop automation script systems and web application development.",
"worksFor": {
"@type": "Organization",
"@id": "https://www.toolique.in/#organization"
},
"founderOf": [
{
"@type": "Organization",
"@id": "https://www.toolique.in/#organization"
}
],
"knowsAbout": [
"Software QA Verification",
"QA Automation Frameworks",
"Python & Selenium Models",
"React & Next.js Stacks",
"3D Printing Custom Design Solutions"
],
"sameAs": [
"https://github.com/ajinkyaswami1999",
"https://www.linkedin.com/in/ajinkya-swami-82751b191/",
"https://www.instagram.com/ajinkyaswami.in/",
"https://voxelique.com",
"https://www.instagram.com/voxelique/"
]
},
{
"@type": "WebSite",
"@id": "https://www.toolique.in/#website",
"name": "Toolique",
"url": "https://www.toolique.in",
"publisher": {
"@type": "Organization",
"@id": "https://www.toolique.in/#organization"
},
"potentialAction": {
"@type": "SearchAction",
"target": "https://www.toolique.in/tools?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
]
}
Toolique | Free Online Tools for Work, Engineering, Finance & More
`: Inserts the text following the matched substring.
- `$`: Escapes a literal dollar sign (`
Regex Tester | TooliqueRegex Tester | Toolique
` and `
).
Multi-Language Integration Examples
Easily port patterns into backend and frontend applications:
```javascript
// JavaScript / TypeScript
const regex = /^[A-Z]{5}[0-9]{4}[A-Z]{1}$/i;
const isValidPan = regex.test(userInput);
```
```python
# Python re
import re
pattern = r"^[A-Z]{5}[0-9]{4}[A-Z]{1}$"
is_valid = bool(re.match(pattern, user_input))
```
```go
// Go regexp
package main
import "regexp"
var panRegex = regexp.MustCompile(`^[A-Z]{5}[0-9]{4}[A-Z]{1}
Regex Tester | TooliqueRegex Tester | Toolique
` and `
)
```
Frequently Asked Questions
What is a regular expression (Regex) and how does it work?
A regular expression is a specialized sequence of characters that defines a search pattern. A regex engine compiles the pattern into a state machine (deterministic or non-deterministic finite automaton) that scans the target string to locate matching substrings, validate input formats, or extract delimited capture groups.
What do the regex flags g, i, m, s, and u mean?
Regex flags modify search behavior: Global (g) matches all occurrences across the subject string instead of stopping at the first match; Insensitive (i) makes letter matching case-insensitive; Multiline (m) allows ^ and $ to match the beginning and end of each line; DotAll (s) allows the dot (.) character to match newline characters (\n); and Unicode (u) treats the pattern as a sequence of full UTF-16 code points.
What is the difference between capturing groups and non-capturing groups?
A capturing group `(pattern)` isolates matched text and assigns it an index ($1, $2, etc.) or a named variable, allowing programmatic extraction or replacement. A non-capturing group `(?:pattern)` applies quantifiers or alternation to sub-expressions without memory allocation or back-reference capture, which improves matching speed and reduces memory overhead.
How do lookahead and lookbehind assertions work?
Lookaheads and lookbehinds are zero-width assertions that verify conditions without consuming characters in the match result. Positive lookahead `(?=abc)` verifies that "abc" follows the current position. Negative lookahead `(?!abc)` ensures "abc" does not follow. Positive lookbehind `(?<=abc)` verifies that "abc" precedes the position, and negative lookbehind `(?
How do I substitute text using capture groups ($1, $2)?
In the replacement string, `$1`, `$2`, and `$n` reference the corresponding capture group indexed from left to right. `
Toolique | Free Online Tools for Work, Engineering, Finance & More
` inserts the entire matched substring, while `
Regex Tester | TooliqueRegex Tester | Toolique
` and `
` and `
` insert the text preceding and following the match respectively. For example, replacing `(\\w+)\\s(\\w+)` with `$2, $1` transforms \"John Doe\" into \"Doe, John\"."
}
},
{
"@type": "Question",
"name": "What is Catastrophic Backtracking (ReDoS)?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Regular Expression Denial of Service (ReDoS) occurs when nested quantifiers (such as `(a+)+
Regex Tester | Toolique
) cause the regex engine to explore exponentially many permutations when attempting to match non-matching strings. Toolique safeguards your browser by enforcing execution safety limits and tracking execution time in milliseconds."
}
},
{
"@type": "Question",
"name": "What are standard regular expressions for Indian identification and billing?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Indian business and government compliance patterns: PAN Card: `^[A-Z]{5}[0-9]{4}[A-Z]{1}
Regex Tester | Toolique
; GSTIN: `^\\d{2}[A-Z]{5}\\d{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}
Regex Tester | Toolique
; Indian 10-digit mobile: `^(?:\\+91|91|0)?[6-9]\\d{9}
Regex Tester | Toolique
; Indian PIN Code: `^[1-9][0-9]{5}
Regex Tester | Toolique
; Formatted Aadhaar: `^[2-9]{1}[0-9]{3}\\s[0-9]{4}\\s[0-9]{4}
Regex Tester | Toolique
."
}
}
]
},
{
"@type": "Organization",
"@id": "https://www.toolique.in/#organization",
"name": "Toolique",
"url": "https://www.toolique.in",
"logo": "https://www.toolique.in/favicon-512x512.png",
"foundingDate": "2026-06-16",
"description": "Toolique is a premium, free, privacy-focused online suite of interactive calculators, developer converters, and programming academy tools operating completely in the browser.",
"contactPoint": {
"@type": "ContactPoint",
"contactType": "customer support",
"email": "support@toolique.in"
},
"founder": {
"@type": "Person",
"@id": "https://www.toolique.in/about-founder#person"
},
"sameAs": [
"https://github.com/ajinkyaswami1999",
"https://www.linkedin.com/in/ajinkya-swami-82751b191/",
"https://www.instagram.com/ajinkyaswami.in/",
"https://voxelique.com",
"https://www.instagram.com/voxelique/"
]
},
{
"@type": "Person",
"@id": "https://www.toolique.in/about-founder#person",
"name": "Ajinkya Swami",
"jobTitle": "Founder & Software Architect",
"image": "https://www.toolique.in/favicon-512x512.png",
"description": "Ajinkya Swami is a QA Automation Engineer, Full-Stack Developer, and founder of Toolique and Voxelique, specializing in custom desktop automation script systems and web application development.",
"worksFor": {
"@type": "Organization",
"@id": "https://www.toolique.in/#organization"
},
"founderOf": [
{
"@type": "Organization",
"@id": "https://www.toolique.in/#organization"
}
],
"knowsAbout": [
"Software QA Verification",
"QA Automation Frameworks",
"Python & Selenium Models",
"React & Next.js Stacks",
"3D Printing Custom Design Solutions"
],
"sameAs": [
"https://github.com/ajinkyaswami1999",
"https://www.linkedin.com/in/ajinkya-swami-82751b191/",
"https://www.instagram.com/ajinkyaswami.in/",
"https://voxelique.com",
"https://www.instagram.com/voxelique/"
]
},
{
"@type": "WebSite",
"@id": "https://www.toolique.in/#website",
"name": "Toolique",
"url": "https://www.toolique.in",
"publisher": {
"@type": "Organization",
"@id": "https://www.toolique.in/#organization"
},
"potentialAction": {
"@type": "SearchAction",
"target": "https://www.toolique.in/tools?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
]
}
Toolique | Free Online Tools for Work, Engineering, Finance & More
` insert the text preceding and following the match respectively. For example, replacing `(\w+)\s(\w+)` with `$2, $1` transforms "John Doe" into "Doe, John".
What is Catastrophic Backtracking (ReDoS)?
Regular Expression Denial of Service (ReDoS) occurs when nested quantifiers (such as `(a+)+
Regex Tester | TooliqueRegex Tester | Toolique
` and `
) cause the regex engine to explore exponentially many permutations when attempting to match non-matching strings. Toolique safeguards your browser by enforcing execution safety limits and tracking execution time in milliseconds.
What are standard regular expressions for Indian identification and billing?
Indian business and government compliance patterns: PAN Card: `^[A-Z]{5}[0-9]{4}[A-Z]{1}
Regex Tester | TooliqueRegex Tester | Toolique
` and `
; GSTIN: `^\d{2}[A-Z]{5}\d{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}
Regex Tester | TooliqueRegex Tester | Toolique
` and `
; Indian 10-digit mobile: `^(?:\+91|91|0)?[6-9]\d{9}
Regex Tester | TooliqueRegex Tester | Toolique
` and `
; Indian PIN Code: `^[1-9][0-9]{5}
Regex Tester | TooliqueRegex Tester | Toolique
` and `
; Formatted Aadhaar: `^[2-9]{1}[0-9]{3}\s[0-9]{4}\s[0-9]{4}
Regex Tester | TooliqueRegex Tester | Toolique
` and `
.
` insert the text preceding and following the match respectively. For example, replacing `(\\w+)\\s(\\w+)` with `$2, $1` transforms \"John Doe\" into \"Doe, John\"."
}
},
{
"@type": "Question",
"name": "What is Catastrophic Backtracking (ReDoS)?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Regular Expression Denial of Service (ReDoS) occurs when nested quantifiers (such as `(a+)+
Regex Tester | Toolique
) cause the regex engine to explore exponentially many permutations when attempting to match non-matching strings. Toolique safeguards your browser by enforcing execution safety limits and tracking execution time in milliseconds."
}
},
{
"@type": "Question",
"name": "What are standard regular expressions for Indian identification and billing?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Indian business and government compliance patterns: PAN Card: `^[A-Z]{5}[0-9]{4}[A-Z]{1}
Regex Tester | Toolique
; GSTIN: `^\\d{2}[A-Z]{5}\\d{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}
Regex Tester | Toolique
; Indian 10-digit mobile: `^(?:\\+91|91|0)?[6-9]\\d{9}
Regex Tester | Toolique
; Indian PIN Code: `^[1-9][0-9]{5}
Regex Tester | Toolique
; Formatted Aadhaar: `^[2-9]{1}[0-9]{3}\\s[0-9]{4}\\s[0-9]{4}
Regex Tester | Toolique
."
}
}
]
},
{
"@type": "Organization",
"@id": "https://www.toolique.in/#organization",
"name": "Toolique",
"url": "https://www.toolique.in",
"logo": "https://www.toolique.in/favicon-512x512.png",
"foundingDate": "2026-06-16",
"description": "Toolique is a premium, free, privacy-focused online suite of interactive calculators, developer converters, and programming academy tools operating completely in the browser.",
"contactPoint": {
"@type": "ContactPoint",
"contactType": "customer support",
"email": "support@toolique.in"
},
"founder": {
"@type": "Person",
"@id": "https://www.toolique.in/about-founder#person"
},
"sameAs": [
"https://github.com/ajinkyaswami1999",
"https://www.linkedin.com/in/ajinkya-swami-82751b191/",
"https://www.instagram.com/ajinkyaswami.in/",
"https://voxelique.com",
"https://www.instagram.com/voxelique/"
]
},
{
"@type": "Person",
"@id": "https://www.toolique.in/about-founder#person",
"name": "Ajinkya Swami",
"jobTitle": "Founder & Software Architect",
"image": "https://www.toolique.in/favicon-512x512.png",
"description": "Ajinkya Swami is a QA Automation Engineer, Full-Stack Developer, and founder of Toolique and Voxelique, specializing in custom desktop automation script systems and web application development.",
"worksFor": {
"@type": "Organization",
"@id": "https://www.toolique.in/#organization"
},
"founderOf": [
{
"@type": "Organization",
"@id": "https://www.toolique.in/#organization"
}
],
"knowsAbout": [
"Software QA Verification",
"QA Automation Frameworks",
"Python & Selenium Models",
"React & Next.js Stacks",
"3D Printing Custom Design Solutions"
],
"sameAs": [
"https://github.com/ajinkyaswami1999",
"https://www.linkedin.com/in/ajinkya-swami-82751b191/",
"https://www.instagram.com/ajinkyaswami.in/",
"https://voxelique.com",
"https://www.instagram.com/voxelique/"
]
},
{
"@type": "WebSite",
"@id": "https://www.toolique.in/#website",
"name": "Toolique",
"url": "https://www.toolique.in",
"publisher": {
"@type": "Organization",
"@id": "https://www.toolique.in/#organization"
},
"potentialAction": {
"@type": "SearchAction",
"target": "https://www.toolique.in/tools?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
]
}
Toolique | Free Online Tools for Work, Engineering, Finance & More