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
Post a Comment