Tool Hub

Regex की सहायता

Regex मेटाकैरेक्टर · फ्लैग · क्लास के लिए इंटरैक्टिव संदर्भ

all
meta
quantifier
class
anchor
group
lookaround
flag

38 entries

meta
.

Any single character except newline

a.c → 'abc'

meta
\d

Digit (0-9)

\d+ → '123'

meta
\D

Non-digit

\D+ → 'abc'

meta
\w

Word char [A-Za-z0-9_]

\w+ → 'foo_1'

meta
\W

Non-word char

\W → '!'

meta
\s

Whitespace (space, tab, newline)

a\sb → 'a b'

meta
\S

Non-whitespace

\S+ → 'foo'

meta
\b

Word boundary

\bcat\b → 'cat'

meta
\B

Non-word boundary

\Bcat → 'concat'

quantifier
*

0 or more (greedy)

a* → '', 'aaa'

quantifier
+

1 or more (greedy)

a+ → 'aaa'

quantifier
?

0 or 1 (optional)

colou?r → 'color', 'colour'

quantifier
{n}

Exactly n times

\d{4} → '2025'

quantifier
{n,}

n or more times

\d{2,} → '12', '123'

quantifier
{n,m}

Between n and m times

\d{2,4} → '12', '1234'

quantifier
*?

0 or more (lazy)

<.*?> → '<a>', '<b>'

quantifier
+?

1 or more (lazy)

.+? → minimal match

class
[abc]

Any one of a, b, c

[aeiou] → vowels

class
[^abc]

None of a, b, c

[^0-9] → non-digit

class
[a-z]

Range a to z

[A-Za-z] → letters

class
[\d\s]

Combined classes

[\d\.] → digit or dot

anchor
^

Start of string (or line with /m)

^foo → starts with foo

anchor
$

End of string (or line with /m)

bar$ → ends with bar

group
(abc)

Capturing group

(\d+)-(\w+) → captures both

group
(?:abc)

Non-capturing group

(?:foo|bar)+

group
(?<name>abc)

Named capture group

(?<year>\d{4})

group
a|b

Alternation (or)

cat|dog → 'cat' or 'dog'

group
\1

Backreference to group 1

(\w)\1 → 'oo' in 'book'

lookaround
(?=abc)

Positive lookahead

\d(?=px) → '12' in '12px'

lookaround
(?!abc)

Negative lookahead

\d(?!px) → digit not followed by px

lookaround
(?<=abc)

Positive lookbehind

(?<=\$)\d+ → '100' in '$100'

lookaround
(?<!abc)

Negative lookbehind

(?<!\$)\d+ → digit not after $

flag
g

Global — all matches

/foo/g

flag
i

Case-insensitive

/FOO/i → matches 'foo'

flag
m

Multiline — ^/$ per line

/^line/m

flag
s

Dotall — . matches newline

/a.b/s

flag
u

Unicode mode

/\u{1F600}/u

flag
y

Sticky — match from lastIndex

/foo/y

कैसे उपयोग करें

  1. Search box में keyword type करें जैसे 'lookahead', 'quantifier', या '\d' entries को filter करने के लिए।
  2. Category badge को click करें results को Anchors, Groups, Quantifiers, Classes, या Lookarounds तक narrow करने के लिए।
  3. Clipboard में copy करने के लिए किसी भी card को click करें इसकी syntax को।
  4. Share link के साथ अपने filtered view को bottom पर copy करें।

उदाहरण

  • 'lookahead' को search करने से list को (?=...) और (?!...) entries तक narrow करता है descriptions और examples के साथ।
  • Quantifiers badge को click करने से +, *, ?, {n,m} जैसे entries दिखाते हैं — हर card syntax, description, और short example string दिखाता है।

उत्पादन में उपयोग से पहले आउटपुट सत्यापित करें। कोई वारंटी नहीं — देखें शर्तें.