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
/
\s(?<App_Name>\w*(?=\.[exeEXE]{3}( |\z))\.[exeEXE]{3})
/
g
\s matches any whitespace character (equivalent to [\r\n\t\f\v ])
Named Capture Group App_Name
(?<App_Name>\w*(?=\.[exeEXE]{3}( |\z))\.[exeEXE]{3})
\w
matches any word character (equivalent to [a-zA-Z0-9_])
* matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)
Positive Lookahead
(?=\.[exeEXE]{3}( |\z))
Assert that the Regex below matches
\. matches the character . with index 4610 (2E16 or 568) literally (case sensitive)
Match a single character present in the list below
[exeEXE]
{3} matches the previous token exactly 3 times
exeEXE
matches a single character in the list exEX (case sensitive)
2nd Capturing Group
( |\z)
1st Alternative
matches the character with index 3210 (2016 or 408) literally (case sensitive)
2nd Alternative
\z
\z asserts position at the end of the string
\. matches the character . with index 4610 (2E16 or 568) literally (case sensitive)
Match a single character present in the list below
[exeEXE]
{3} matches the previous token exactly 3 times
exeEXE
matches a single character in the list exEX (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

Regex Debugger

Please wait while your expression is being debugged...