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
"
(?i)\bflirt[\wá-ú]+
"
g
(?i)
match the remainder of the pattern with the following effective flags: gi
i modifier: insensitive. Case insensitive match (ignores case of [a-zA-Z])
\b assert position at a word boundary: (^\w|\w$|\W\w|\w\W)
flirt
matches the characters flirt literally (case insensitive)
Match a single character present in the list below
[\wá-ú]
+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
\w matches any word character (equivalent to [a-zA-Z0-9_])
à matches the character à with index 19510 (C316 or 3038) literally (case insensitive)
¡-à matches a single character in the range between ¡ (index 161) and à (index 195) (case insensitive)
º matches the character º with index 18610 (BA16 or 2728) literally (case insensitive)
Global pattern flags
g modifier: global. All matches (don't return after first match)
Your regular expression does not match the subject string.

Regular Expression
No Match

r"
"
g

Test String

Substitution

Processing...