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
/
.\\(.)\\(.)\\(.)( \((\d)\))?\\(\d)-(.)\.flac$
/
i
.
matches any character (except for line terminators)
* 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)
1st Capturing Group
(.)
.
matches any character (except for line terminators)
* 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)
2nd Capturing Group
(.)
.
matches any character (except for line terminators)
* 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)
3rd Capturing Group
(.)
.
matches any character (except for line terminators)
*? matches the previous token between zero and unlimited times, as few times as possible, expanding as needed (lazy)
4th Capturing Group
( \((\d)\))?
? matches the previous token between zero and one times, as many times as possible, giving back as needed (greedy)
matches the character literally (case insensitive)
\( matches the character ( literally (case insensitive)
5th Capturing Group
(\d)
\) matches the character ) literally (case insensitive)
\\ matches the character \ literally (case insensitive)
6th Capturing Group
(\d)
- matches the character - literally (case insensitive)
7th Capturing Group
(.)
\. matches the character . literally (case insensitive)
flac matches the characters flac literally (case insensitive)
$ asserts position at the end of the string
Global pattern flags
i modifier: insensitive. Case insensitive match (ignores case of [a-zA-Z])
Your regular expression does not match the subject string.

Regular Expression
No Match

/
/
i

Test String