Developer
Regex Tester & Extractor
Regex pattern को real-time में टेस्ट करें, match highlight देखें, capture groups inspect करें और code snippet बनाएं।
Regex Workspace
Matches: 2HIGHLIGHT RESULT
product-120 order-42 invalid
CAPTURE GROUPS
| # | Full Match | Groups |
|---|---|---|
| 1 | product-120 | g1: product | g2: 120 |
| 2 | order-42 | g1: order | g2: 42 |
Reference
Regex Cheat Sheet
| Token | Meaning |
|---|---|
| . | Any character except newline |
| \d | Digit (0-9) |
| \w | Word character |
| \s | Whitespace |
| ^ / $ | Start / end of line |
| [abc] | Any character in class |
| [^abc] | Any character not in class |
| ( ... ) | Capture group |
| (?: ... ) | Non-capturing group |
| a|b | Alternation |
| * + ? | Quantifiers |
| {n,m} | Range quantifier |
Code Snippet
const regex = new RegExp('(\\w+)-(\\d+)', 'g');
const text = 'product-120
order-42
invalid';
const matches = [...text.matchAll(regex.global ? regex : new RegExp(regex.source, regex.flags + 'g'))];
console.log(matches);Share
आपको यह भी पसंद आ सकता है
- JSON Path FinderJSON जांचें, सही JSONPath expressions कॉपी करें और paths को ब्राउज़र में टेस्ट करें।
- URL Encoder DecoderURL components को अपने ब्राउज़र में locally encode और decode करें।
- Base64 Encoder DecoderBase64 text को अपने ब्राउज़र में locally encode और decode करें।
- GUID / UUID GeneratorUUID generate करें और GUID को short GUID में locally convert करें।
- JSON FormatterJSON को तुरंत फॉर्मेट, वैलिडेट और मिनीफाई करें। एक क्लिक में कॉपी करें।
- Cron पार्सरपूरी crontab line को command सहित parse करें, schedule समझें और अगली 5 execution times देखें।
- HTML प्रीव्यूअरHTML लिखें या पेस्ट करें और सैंडबॉक्स iframe में लाइव प्रीव्यू देखें। पूर्ण पेज और fragment दोनों सपोर्ट करता है।
- JWT डिकोडरJWT टोकन को तुरंत डिकोड और जांचें। हेडर, पेलोड क्लेम और एक्सपायरी स्टेटस देखें।
- Number Base ConverterInstantly convert numbers between binary, octal, decimal, and hexadecimal. Supports large numbers. 100% client-side.
- Unix Timestamp कनवर्टरUnix epoch को दिनांक/समय में और वापस बदलें। 100% क्लाइंट-साइड।