Looking for a regex to get the number from a string.
My string could be:
abcd1
abcd01
abcd11
I tried this but it is not working: /\d+$/ and some others but they are not seems to be correct.
Is there any easy way to get the number from a string? ANd it will be at the end.
I believe you want this regex (without the beginning slashes as C# does not need that)
To ignore leading 0
[1-9]\d*$
If you want to drop ALL leading 0’s, it honestly would be easier to just cast your result to an
Int32