📖 Explanation

📖

Pattern breakdown will appear here

📚 Quick Reference

Character Classes

  • . Any character except newline
  • \w Word character [a-zA-Z0-9_]
  • \d Digit [0-9]
  • \s Whitespace
  • \W \D \S Negated versions
  • [abc] Character set
  • [^abc] Negated character set
  • [a-z] Character range

Quantifiers

  • * 0 or more
  • + 1 or more
  • ? 0 or 1
  • {n} Exactly n
  • {n,} n or more
  • {n,m} Between n and m
  • *? 0 or more (lazy)
  • +? 1 or more (lazy)
  • ?? 0 or 1 (lazy)

Anchors

  • ^ Start of string/line
  • $ End of string/line
  • \b Word boundary
  • \B Non-word boundary

Groups & References

  • (abc) Capturing group
  • (?:abc) Non-capturing group
  • (?<name>abc) Named group
  • \1 Backreference
  • \k<name> Named reference
  • a|b Alternation

Lookaround

  • (?=abc) Positive lookahead
  • (?!abc) Negative lookahead
  • (?<=abc) Positive lookbehind
  • (?<!abc) Negative lookbehind

Escape Sequences

  • \t Tab
  • \n Newline
  • \r Carriage return
  • \\ Backslash
  • \. Escaped special char

Flags

  • g Global search
  • i Case-insensitive
  • m Multi-line mode
  • s Dot matches newline
  • u Unicode mode
  • y Sticky mode

⚡ Function

✨ Regular Expression

/ / g

📝 Test String

0 characters

📊 Statistics

0 Matches
0 Groups
0 Steps

🎯 Match Information

🔍

Enter a regex pattern and test string to see matches