Regular Expressions 101

@regex101
Donate
Sponsor
Contact
Bug Reports & Feedback
Wiki
Whats new?

Save & Share

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

Flavor

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

Function

  • Match
  • Substitution
  • List
  • Unit Tests
/
\| *\{\{cal\|([*a-z])\}\}.*\{\{dm\|([*a-z 0-9|])\}\} *\|\|(.*) *, *(.*) *, *(.*) *\{\{SmallFlag\|(.*)\}\}
/
gi
\| matches the character | literally (case insensitive)
matches the character literally (case insensitive)
* matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)
\{ matches the character { literally (case insensitive)
\{ matches the character { literally (case insensitive)
cal matches the characters cal literally (case insensitive)
\| matches the character | literally (case insensitive)
1st Capturing Group
([*a-z])
Match a single character present in the list below
[a-z]
* matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)
a-z matches a single character in the range between a (index 97) and z (index 122) (case insensitive)
\} matches the character } literally (case insensitive)
\} matches the character } literally (case insensitive)
.
matches any character (except for line terminators)
\{ matches the character { literally (case insensitive)
\{ matches the character { literally (case insensitive)
dm matches the characters dm literally (case insensitive)
\| matches the character | literally (case insensitive)
2nd Capturing Group
([*a-z 0-9|])
\} matches the character } literally (case insensitive)
\} matches the character } literally (case insensitive)
matches the character literally (case insensitive)
\| matches the character | literally (case insensitive)
\| matches the character | literally (case insensitive)
3rd Capturing Group
(.*)
matches the character literally (case insensitive)
, matches the character , literally (case insensitive)
matches the character literally (case insensitive)
4th Capturing Group
(.*)
matches the character literally (case insensitive)
, matches the character , literally (case insensitive)
matches the character literally (case insensitive)
5th Capturing Group
(.*)
matches the character literally (case insensitive)
\{ matches the character { literally (case insensitive)
\{ matches the character { literally (case insensitive)
SmallFlag matches the characters SmallFlag literally (case insensitive)
\| matches the character | literally (case insensitive)
6th Capturing Group
(.*)
\} matches the character } literally (case insensitive)
\} matches the character } literally (case insensitive)
Global pattern flags
g modifier: global. All matches (don't return after first match)
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

/
/
gi

Test String