Regex get last number in string
Hi !
Can someone plz help me to extract last number in strings using Regex ?
here some examples:
1: "ksdhfkjsdhf 12"
2: "sdfsd fd sdfsdf 333"
3: "jgjhhhjdfg15"
the result should be:
12
333
15
Thanks !!!
Hi !
Can someone plz help me to extract last number in strings using Regex ?
here some examples:
1: "ksdhfkjsdhf 12"
2: "sdfsd fd sdfsdf 333"
3: "jgjhhhjdfg15"
the result should be:
12
333
15
Thanks !!!
Something like this should work if it DOES include that (in fact, it will work even if it doesn't):
(\d+)"*$
I strongly recommend downloading Regexp Builder from:
http://www.gotdotnet.com/Workspaces/Workspace.aspx?id=9e33c395-8275-4906-8a09-0bff41fdc1d6
It will let you easily play around with different search text and search expressions. Well worth it!
Thanks for your answer !
text does not include the 1: and the quotes.
I will try RegExp Builder
Bye
here is also a good tool for Regular expression
http://tools.osherove.com/CoolTools/Regulator/tabid/185/Default.aspx
:)