Regular Expressions 101

Save & Share

  • Save Regex
    ctrl+s
  • Update Regex
    ctrl+⇧+s

Flavor

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

Function

  • Match
  • Substitution
  • List
  • Unit Tests
/
(h[a|à] [n|l][o|ộ]i)
/
gmi
1st Capturing Group
(h[a|à] [n|l][o|ộ]i)
h matches the character h with index 10410 (6816 or 1508) literally (case insensitive)
Match a single character present in the list below
[a|à]
a|à
matches a single character in the list a|à (case insensitive)
matches the character with index 3210 (2016 or 408) literally (case insensitive)
Match a single character present in the list below
[n|l]
n|l
matches a single character in the list n|l (case insensitive)
Match a single character present in the list below
[o|ộ]
o|ộ
matches a single character in the list o|ộ (case insensitive)
i matches the character i with index 10510 (6916 or 1518) literally (case insensitive)
Global pattern flags
g modifier: global. All matches (don't return after first match)
m modifier: multi line. Causes ^ and $ to match the begin/end of each line (not only begin/end of string)
i modifier: insensitive. Case insensitive match (ignores case of [a-zA-Z])
Your regular expression does not match the subject string.Try launching the debugger to find out why.

Regular Expression
No Match

/
/
gmi

Test String