Regular Expressions 101

Sponsors

Library entries

0
pcre

first regex

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

search h1 tag html

(.*?) example: Your best title
Submitted by otharwa - 8 years ago
1
pcre

codegolf.SE cops&robbers histocrat#2

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

Test for Ross

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

Movies title extractor

Extract the title from a movie file
Submitted by dshinigami - 8 years ago
0
python

DOI matcher

Matches any valid DOI
Submitted by jpowell - 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