Regular Expressions 101

Sponsors

Library entries

2
pcre

PO Box Address Validation

no description available
Submitted by mrferos - 8 years ago
-2
pcre

regex101

no description available
Submitted by anonymous - 8 years ago
0
pcre

URLs

split URL in 2 parts
Submitted by A.L - 8 years ago
1
pcre

LGC regex

FIX
Submitted by anonymous - 8 years ago
1
pcre

LGC regex

no description available
Submitted by anonymous - 8 years ago
1
pcre

Subquery

no description available
Submitted by anonymous - 8 years ago
0
pcre

Find color

no description available
Submitted by anonymous - 8 years ago
1
pcre

test

no description available
Submitted by anonymous - 8 years ago
1
pcre

parser

no description available
Submitted by anonymous - 8 years ago

Command handling

Vote

4

Regular Expression
pcre

/
#Command handler #=============== #Start of the line ^ #Match the command name (?<cmd>[\w\d\-\_\?]+) #Catch as many parameters as possible (?<params> ( \ + (?<pre>[^\-\\\/\w\d\s\n\r]?) [^\"]*\k<pre> )* )? #Catch as many switches as possible and save them into group (?<switches> ( \ + #Switch starts with -- or - or / (?:\-\-|\-|\/) #Gotcha! [\w\d\_]+ )* )? #At the end of the line can be some spaces \ *$ #End of the line
/
gmx

Description

Loading markdown...
Submitted by anonymous - 8 years ago