Regex Tester (Matches, Groups, और Replacement Preview)
Regex test जल्दी चलानी है? इस regex tester में paste करें और तुरंत verify करें।
Highlighted matches, capture groups, और replacement output एक ही screen में देखें।
उपयोग कैसे करें
- Pattern दर्ज करें और ज़रूरी flags चुनें (g/i/m)।
- Source text paste करें। यदि auto-run ON है, तो results तुरंत update होंगी।
- Locations inspect करने और हर match पर jump करने के लिए match list का उपयोग करें।
- Captures और replacement output verify करने के लिए Groups और Replacement tabs उपयोग करें।
उदाहरण
Email extraction
इनपुट: Email addresses वाला text
आउटपुट: Highlighted matches और start/end positions
key=value replacement
इनपुट: Multi-line key=value text
आउटपुट: $1 और $2 का उपयोग करते हुए replacement output
Log line filter
इनपुट: INFO / WARN / ERROR वाला log text
आउटपुट: m flag के साथ line-based matching
Replacement Cheat Sheet
- $1, $2 ... : capture group references
- $& : पूरा match
- $` : match से पहले / $' : match के बाद
नोट
- यह tool patterns को JavaScript (ECMAScript) regular expressions से evaluate करती है।
- कुछ PCRE features (जैसे atomic groups) उपलब्ध नहीं हैं।
- JavaScript features भी runtime environment के अनुसार अलग हो सकती हैं।
- Results के PCRE के समान होने की गारंटी नहीं है।
अक्सर पूछे जाने वाले प्रश्न
g/i/m flags क्या हैं?
Checkboxes से इन्हें toggle करें। (g=global, i=ignore case, m=multiline)
क्या मैं replacement भी test कर सकता हूँ?
हाँ। Replacement string दर्ज करें और Replacement tab देखें। $1 जैसे group references supported हैं।
यह PCRE से कैसे अलग है?
यह tool JavaScript regular expressions उपयोग करती है। Spec differences के कारण वही pattern PCRE से अलग result दे सकती है।