Regular Expressions 101

Save & Share

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

Flavor

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

Function

  • Match
  • Substitution
  • List
  • Unit Tests
/
^Mono: GC_(.{5}).*time ([0-9\\.]*)ms
/
g
^ asserts position at start of the string
Mono: GC_
matches the characters Mono: GC_ literally (case sensitive)
1st Capturing Group
(.{5})
.
matches any character (except for line terminators)
{5} matches the previous token exactly 5 times
.
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)
time
matches the characters time literally (case sensitive)
2nd Capturing Group
([0-9\\.]*)
Match a single character present in the list below
[0-9\\.]
* matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)
0-9 matches a single character in the range between 0 (index 48) and 9 (index 57) (case sensitive)
\\ matches the character \ with index 9210 (5C16 or 1348) literally (case sensitive)
. matches the character . with index 4610 (2E16 or 568) literally (case sensitive)
ms
matches the characters ms literally (case sensitive)
Global pattern flags
g modifier: global. All matches (don't return after first match)
Your regular expression does not match the subject string.Try launching the debugger to find out why.

Regular Expression
No Match

/
/
g

Test String