DEV

Regex Tester Online — Regular Expressions Test करें

Regular expressions शक्तिशाली हैं लेकिन syntax याद रखना मुश्किल होता है। हमारा Regex Tester आपको pattern लिखते समय real-time में matches highlight करता है और groups दिखाता है।

Regex Tester के Features

  • Real-time match highlighting
  • Named और numbered capture groups
  • Flags support: g (global), i (case-insensitive), m (multiline)
  • Match count और position information
  • JavaScript, Python, Java syntax support

Common Regex Patterns

कुछ frequently used patterns:

  • Email: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
  • Phone (India): ^[6-9]\d{9}$
  • URL: https?://[^\s]+

Lookahead और Lookbehind

Advanced regex में lookahead ((?=...)) और lookbehind ((?<=...)) का उपयोग होता है। हमारा visualizer इन complex patterns को भी समझाता है।

Test करें: Regex Tester Online

अक्सर पूछे जाने वाले प्रश्न

क्या सभी programming languages में regex same होती है?

Basic syntax similar है, लेकिन कुछ features language-specific हैं। Python में named groups (?P<name>) syntax use करते हैं।

Regex slow क्यों होती है?

Catastrophic backtracking से regex exponentially slow हो सकती है। Tool में performance warnings दिखाए जाते हैं।

Mobile number validation के लिए regex?

India के लिए: ^(\+91|0)?[6-9]\d{9}$ — यह +91, 0 prefix और 10-digit numbers सभी handle करता है।