Regular Expressions 101

Save & Share

Flavor

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

Function

  • Match
  • Substitution
  • List
  • Unit Tests
/
\x3ci\x3e(.{1,3})\x3c\/i\x3e
/
\x3c matches the character < with index 3C16 (6010 or 748) literally (case sensitive)
i matches the character i with index 10510 (6916 or 1518) literally (case sensitive)
\x3e matches the character > with index 3E16 (6210 or 768) literally (case sensitive)
1st Capturing Group
(.{1,3})
.
matches any character (except for line terminators)
{1,3} matches the previous token between 1 and 3 times, as many times as possible, giving back as needed (greedy)
\x3c matches the character < with index 3C16 (6010 or 748) literally (case sensitive)
\/ matches the character / with index 4710 (2F16 or 578) literally (case sensitive)
i matches the character i with index 10510 (6916 or 1518) literally (case sensitive)
\x3e matches the character > with index 3E16 (6210 or 768) literally (case sensitive)
Your regular expression does not match the subject string.

Regular Expression
No Match

/
/

Test String

Substitution

Processing...