Craig Gallagher Craig Gallagher - 10 months ago 78
C# Question

Regular expression lowercase letter followed by a number

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.

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.

Answer Source

[a-z]\d+ will work just fine.

It looks for any lowercase letter followed by any amount of digits.