c# - Regular expression, read from start of string -
i need regular expression i'm trying develop in relation retrieving jira check-in id's message. need able given string:
wyp-857, gl-1723 , message gty-817 check-in. match values wyp-857 , gl-1723. criteria must match 2 5 alpha characters, followed hyphen , 3 or more numbers. these individual matches must start @ beginning of string , can have multiple occurrences separated commas, semi-colons or spaces. in case gty-817 should not matched because not @ start of string. attempts have made far have seemed match wyp-857, gl-1723 entirely , not returned individual matches. appreciated.
you can try regex
^[a-za-z]{2,5}-\d{3,}([,;\s][a-za-z]{2,5}-\d{3,})*
Comments
Post a Comment