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

iphone - Three second countdown in cocos2d -

hyperlink - how to do url routing in php -

c - Avoiding Extra Malloc in Linked List (node->next = NULL) -