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 (RE2)

Function

  • Match
  • Substitution
  • List
  • Unit Tests
/
^(Jan|Fev|Ma[ri]|Abr|Ju[ln]|Ago|Set|Out|Nov|Dez)\/(Se[gx]|Ter|Qu[ai]|Sab|Dom)$
/
gm
^ asserts position at start of a line
1st Capturing Group
(Jan|Fev|Ma[ri]|Abr|Ju[ln]|Ago|Set|Out|Nov|Dez)
1st Alternative
Jan
Jan matches the characters Jan literally (case sensitive)
2nd Alternative
Fev
Fev matches the characters Fev literally (case sensitive)
3rd Alternative
Ma[ri]
Ma matches the characters Ma literally (case sensitive)
Match a single character present in the list below
[ri]
ri matches a single character in the list ri (case sensitive)
4th Alternative
Abr
Abr matches the characters Abr literally (case sensitive)
5th Alternative
Ju[ln]
Ju matches the characters Ju literally (case sensitive)
Match a single character present in the list below
[ln]
ln matches a single character in the list ln (case sensitive)
6th Alternative
Ago
Ago matches the characters Ago literally (case sensitive)
7th Alternative
Set
Set matches the characters Set literally (case sensitive)
8th Alternative
Out
9th Alternative
Nov
10th Alternative
Dez
\/ matches the character / literally (case sensitive)
2nd Capturing Group
(Se[gx]|Ter|Qu[ai]|Sab|Dom)
1st Alternative
Se[gx]
Se matches the characters Se literally (case sensitive)
Match a single character present in the list below
[gx]
gx matches a single character in the list gx (case sensitive)
2nd Alternative
Ter
Ter matches the characters Ter literally (case sensitive)
3rd Alternative
Qu[ai]
Qu matches the characters Qu literally (case sensitive)
Match a single character present in the list below
[ai]
ai matches a single character in the list ai (case sensitive)
4th Alternative
Sab
Sab matches the characters Sab literally (case sensitive)
5th Alternative
Dom
Dom matches the characters Dom literally (case sensitive)
$ asserts position at the end of a line
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)
Your regular expression does not match the subject string.Try launching the debugger to find out why.

Regular Expression
No Match

/
/
gm

Test String