Regular Expressions 101

Save & Share

  • Save Regex
  • Update Regex


  • PCRE2 (PHP >=7.3)
  • PCRE (PHP <7.3)
  • ECMAScript (JavaScript)
  • Python
  • Golang
  • Java 8


  • Match
  • Substitution
  • List
  • Unit Tests
matches the characters <img literally (case sensitive)
1st Capturing Group
Match a single character present in the list below
+? matches the previous token between one and unlimited times, as few times as possible, expanding as needed (lazy)
\w matches any word character (equivalent to [a-zA-Z0-9_])
\W matches any non-word character (equivalent to [^a-zA-Z0-9_])
> matches the character > with index 6210 (3E16 or 768) literally (case sensitive)
Global pattern flags
g modifier: global. All matches (don't return after first match)
Your regular expression does not match the subject string.Try launching the debugger to find out why.

Regular Expression
No Match


Test String

Regex Debugger

Please wait while your expression is being debugged...