Reputation: 1633
I'm trying to get the hang of regular expression. I'm scanning through an xml file and I want to do is find any word starting with a lowercase letter fallowed by a number e.g. c1234
I assume it's something like [a-z 0-9]
but it's finding single characters instead of a whole word. Any ideas on how to do this would really be appreciated.
Upvotes: 1
Views: 144
Reputation: 823
About regex you can read here: https://msdn.microsoft.com/ru-ru/library/az24scfc(v=vs.110).aspx
test your regex you can here: http://www.regexlib.com/RETester.aspx
I think, you help this construction: \b[a-z]\d+
Upvotes: 1
Reputation: 2950
[a-z]\d+
will work just fine.
It looks for any lowercase letter followed by any amount of digits.
Upvotes: 2