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
/
^(?=.$)(?=.(\(\.\{8\}\)\?\\.[^(]){57}\)\{2\}\.\{12\}\$\/D$)((.)?\/(.)?\^(.)?\((.)?\?=(.)?\.(.)?\{610(.)?\}(.)?\$(.)?\)(.)?\((.)?\?=(.)?\.(.)?\{71(.)?\}(.)?\((.)?\\(.)?\((.)?\\(.)?\.(.)?\\(.)?\{8(.)?\\(.)?\}(.)?\\(.)?\)(.)?\\(.)?\?(.)?\\(.)?\\(.)?\.(.)?\[(.)?\^(.)?\((.)?\](.)?\*(.)?\)(.)?\{57(.)?\}(.)?\\(.)?\)(.)?\\(.)?\{2(.)?\\(.)?\}(.)?\\(.)?\.(.)?\\(.)?\{12(.)?\\(.)?\}(.)?\\(.)?\$(.)?\\(.)?\/D(.)?\$(.)?\)(.)?\(){2}.$
/
D
^ asserts position at start of the string
Positive Lookahead
(?=.$)
Assert that the Regex below matches
.
matches any character (except for line terminators)
{610} matches the previous token exactly 610 times
$ asserts position at the end of the string
Positive Lookahead
(?=.(\(\.\{8\}\)\?\\.[^(]){57}\)\{2\}\.\{12\}\$\/D$)
Assert that the Regex below matches
.
matches any character (except for line terminators)
{71} matches the previous token exactly 71 times
1st Capturing Group
(\(\.\{8\}\)\?\\.[^(]){57}
{57} matches the previous token exactly 57 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
\( matches the character ( literally (case sensitive)
\. matches the character . literally (case sensitive)
\{ matches the character { literally (case sensitive)
8 matches the character 8 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)
Match a single character not present in the list below
[^(]
\) 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)
12 matches the characters 12 literally (case sensitive)
\} matches the character } literally (case sensitive)
\$ matches the character $ literally (case sensitive)
\/ matches the character / literally (case sensitive)
D matches the character D literally (case sensitive)
$ asserts position at the end of the string
2nd Capturing Group
((.)?\/(.)?\^(.)?\((.)?\?=(.)?\.(.)?\{610(.)?\}(.)?\$(.)?\)(.)?\((.)?\?=(.)?\.(.)?\{71(.)?\}(.)?\((.)?\\(.)?\((.)?\\(.)?\.(.)?\\(.)?\{8(.)?\\(.)?\}(.)?\\(.)?\)(.)?\\(.)?\?(.)?\\(.)?\\(.)?\.(.)?\[(.)?\^(.)?\((.)?\](.)?\*(.)?\)(.)?\{57(.)?\}(.)?\\(.)?\)(.)?\\(.)?\{2(.)?\\(.)?\}(.)?\\(.)?\.(.)?\\(.)?\{12(.)?\\(.)?\}(.)?\\(.)?\$(.)?\\(.)?\/D(.)?\$(.)?\)(.)?\(){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
3rd Capturing Group
(.)?
? matches the previous token between zero and one times, as many times as possible, giving back as needed (greedy)
.
matches any character (except for line terminators)
\/ matches the character / literally (case sensitive)
4th Capturing Group
(.)?
? matches the previous token between zero and one times, as many times as possible, giving back as needed (greedy)
.
matches any character (except for line terminators)
\^ matches the character ^ literally (case sensitive)
5th Capturing Group
(.)?
\( matches the character ( literally (case sensitive)
6th Capturing Group
(.)?
\? matches the character ? literally (case sensitive)
= matches the character = literally (case sensitive)
7th Capturing Group
(.)?
\. matches the character . literally (case sensitive)
8th Capturing Group
(.)?
\{ matches the character { literally (case sensitive)
610 matches the characters 610 literally (case sensitive)
9th Capturing Group
(.)?
\} matches the character } literally (case sensitive)
10th Capturing Group
(.)?
\$ matches the character $ literally (case sensitive)
11th Capturing Group
(.)?
\) matches the character ) literally (case sensitive)
12th Capturing Group
(.)?
\( matches the character ( literally (case sensitive)
13th Capturing Group
(.)?
\? matches the character ? literally (case sensitive)
= matches the character = literally (case sensitive)
14th Capturing Group
(.)?
\. matches the character . literally (case sensitive)
15th Capturing Group
(.)?
\{ matches the character { literally (case sensitive)
71 matches the characters 71 literally (case sensitive)
16th Capturing Group
(.)?
\} matches the character } literally (case sensitive)
17th Capturing Group
(.)?
\( matches the character ( literally (case sensitive)
18th Capturing Group
(.)?
\\ matches the character \ literally (case sensitive)
19th Capturing Group
(.)?
\( matches the character ( literally (case sensitive)
20th Capturing Group
(.)?
\\ matches the character \ literally (case sensitive)
21st Capturing Group
(.)?
\. matches the character . literally (case sensitive)
22nd Capturing Group
(.)?
\\ matches the character \ literally (case sensitive)
23rd Capturing Group
(.)?
\{ matches the character { literally (case sensitive)
8 matches the character 8 literally (case sensitive)
24th Capturing Group
(.)?
\\ matches the character \ literally (case sensitive)
25th Capturing Group
(.)?
\} matches the character } literally (case sensitive)
26th Capturing Group
(.)?
\\ matches the character \ literally (case sensitive)
27th Capturing Group
(.)?
\) matches the character ) literally (case sensitive)
28th Capturing Group
(.)?
\\ matches the character \ literally (case sensitive)
29th Capturing Group
(.)?
\? matches the character ? literally (case sensitive)
30th Capturing Group
(.)?
\\ matches the character \ literally (case sensitive)
31st Capturing Group
(.)?
\\ matches the character \ literally (case sensitive)
32nd Capturing Group
(.)?
\. matches the character . literally (case sensitive)
33rd Capturing Group
(.)?
\[ matches the character [ literally (case sensitive)
34th Capturing Group
(.)?
\^ matches the character ^ literally (case sensitive)
35th Capturing Group
(.)?
\( matches the character ( literally (case sensitive)
36th Capturing Group
(.)?
\] matches the character ] literally (case sensitive)
37th Capturing Group
(.)?
\* matches the character * literally (case sensitive)
38th Capturing Group
(.)?
\) matches the character ) literally (case sensitive)
39th Capturing Group
(.)?
\{ matches the character { literally (case sensitive)
57 matches the characters 57 literally (case sensitive)
40th Capturing Group
(.)?
\} matches the character } literally (case sensitive)
41st Capturing Group
(.)?
\\ matches the character \ literally (case sensitive)
42nd Capturing Group
(.)?
\) matches the character ) literally (case sensitive)
43rd Capturing Group
(.)?
\\ matches the character \ literally (case sensitive)
44th Capturing Group
(.)?
\{ matches the character { literally (case sensitive)
2 matches the character 2 literally (case sensitive)
45th Capturing Group
(.)?
\\ matches the character \ literally (case sensitive)
46th Capturing Group
(.)?
\} matches the character } literally (case sensitive)
47th Capturing Group
(.)?
\\ matches the character \ literally (case sensitive)
48th Capturing Group
(.)?
\. matches the character . literally (case sensitive)
49th Capturing Group
(.)?
\\ matches the character \ literally (case sensitive)
50th Capturing Group
(.)?
\{ matches the character { literally (case sensitive)
12 matches the characters 12 literally (case sensitive)
51st Capturing Group
(.)?
\\ matches the character \ literally (case sensitive)
52nd Capturing Group
(.)?
\} matches the character } literally (case sensitive)
53rd Capturing Group
(.)?
\\ matches the character \ literally (case sensitive)
54th Capturing Group
(.)?
\$ matches the character $ literally (case sensitive)
55th Capturing Group
(.)?
\\ matches the character \ literally (case sensitive)
56th Capturing Group
(.)?
\/ matches the character / literally (case sensitive)
D matches the character D literally (case sensitive)
57th Capturing Group
(.)?
\$ matches the character $ literally (case sensitive)
58th Capturing Group
(.)?
\) matches the character ) literally (case sensitive)
59th Capturing Group
(.)?
\( matches the character ( literally (case sensitive)
.
matches any character (except for line terminators)
{12} matches the previous token exactly 12 times
$ asserts position at the end of the string
Global pattern flags
D modifier: Dollar. Force the a dollar sign, $, to always match end of the string, instead of end of the line. This option is ignored if the m-flag is set
Your regular expression does not match the subject string.Try launching the debugger to find out why.

Regular Expression
No Match

/
/
D

Test String