c# - Creating working regex -


i not regex. however, don't know i'm doing wrong here. need regex match "-e1 (" or "-e22 (" etc. trying

var pattern = @"[-e][0-9]?\s\(" 

but returns no matches "s1-e2 (702)" or "s3-e16 (705)".

any great. using c#.

with [-e] going match - or e..not both

to match multiple digits use [0-9]+..+ here quantifier match 1 many digits

so,it should be

var pattern = @"-e\d+\s\(" 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -