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
/
^(?=.2\)\?\.\*\\.\\2\\\(\)\{2\}\.\{11\}\$\/$)((.)(\2\2)?.\/\2\^\2\(\2\?=\2\.\2\{64\2\}2\2\\\2\)\2\\\2\?\2\\\2\.\2\\\2\*\2\\\2\\\2\.\2\{204\2\}\2\\\2\\2\2\\\2\\\2\\\2\(\2\\\2\)\2\\\2\{2\2\\\2\}\2\\\2\.\2\\\2\{11\2\\\2\}\2\\\2\$\2\\\2\/\2\$\2\)\2\(\2\(\2\.\2\*\2\)\2\(){2}.$
/
^ asserts position at start of the string
Positive Lookahead
(?=.2\)\?\.\*\\.\\2\\\(\)\{2\}\.\{11\}\$\/$)
Assert that the Regex below matches
.
matches any character (except for line terminators)
{64} matches the previous token exactly 64 times
2 matches the character 2 literally (case sensitive)
\) matches the character ) literally (case sensitive)
\? matches the character ? literally (case sensitive)
\. matches the character . literally (case sensitive)
\* matches the character * literally (case sensitive)
\\ matches the character \ literally (case sensitive)
.
matches any character (except for line terminators)
\\ matches the character \ literally (case sensitive)
2 matches the character 2 literally (case sensitive)
\\ matches the character \ literally (case sensitive)
\( matches the character ( literally (case sensitive)
\) matches the character ) literally (case sensitive)
\{ matches the character { literally (case sensitive)
2 matches the character 2 literally (case sensitive)
\} matches the character } literally (case sensitive)
\. matches the character . literally (case sensitive)
\{ matches the character { literally (case sensitive)
11 matches the characters 11 literally (case sensitive)
\} matches the character } literally (case sensitive)
\$ matches the character $ literally (case sensitive)
\/ matches the character / literally (case sensitive)
$ asserts position at the end of the string
1st Capturing Group
((.)(\2\2)?.\/\2\^\2\(\2\?=\2\.\2\{64\2\}2\2\\\2\)\2\\\2\?\2\\\2\.\2\\\2\*\2\\\2\\\2\.\2\{204\2\}\2\\\2\\2\2\\\2\\\2\\\2\(\2\\\2\)\2\\\2\{2\2\\\2\}\2\\\2\.\2\\\2\{11\2\\\2\}\2\\\2\$\2\\\2\/\2\$\2\)\2\(\2\(\2\.\2\*\2\)\2\(){2}
{2} matches the previous token exactly 2 times
A repeated capturing group will only capture the last iteration. Put a capturing group around the repeated group to capture all iterations or use a non-capturing group instead if you're not interested in the data
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)
3rd Capturing Group
(\2\2)?
? matches the previous token between zero and one times, as many times as possible, giving back as needed (greedy)
\2 matches the same text as most recently matched by the 2nd capturing group
\2 matches the same text as most recently matched by the 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 sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\^ matches the character ^ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\( matches the character ( literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\? matches the character ? literally (case sensitive)
= matches the character = literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\. matches the character . literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\{ matches the character { literally (case sensitive)
64 matches the characters 64 literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\} matches the character } literally (case sensitive)
2 matches the character 2 literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\) matches the character ) literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\? matches the character ? literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\. matches the character . literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\* matches the character * literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\. matches the character . literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\{ matches the character { literally (case sensitive)
204 matches the characters 204 literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\} matches the character } literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
2 matches the character 2 literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\( matches the character ( literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\) matches the character ) literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\{ matches the character { literally (case sensitive)
2 matches the character 2 literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\} matches the character } literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\. matches the character . literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\{ matches the character { literally (case sensitive)
11 matches the characters 11 literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\} matches the character } literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\$ matches the character $ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\\ matches the character \ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\/ matches the character / literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\$ matches the character $ literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\) matches the character ) literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\( matches the character ( literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\( matches the character ( literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\. matches the character . literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\* matches the character * literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\) matches the character ) literally (case sensitive)
\2 matches the same text as most recently matched by the 2nd capturing group
\( matches the character ( literally (case sensitive)
.
matches any character (except for line terminators)
{11} matches the previous token exactly 11 times
$ asserts position at the end of the string
Your regular expression does not match the subject string.

Regular Expression
No Match

/
/

Test String