Hi all,
I'm useless with regex - please help!
I need to extract the last digit from the string - but here's the catch if the digit is 0001 I want only to capture the 1 not the leading 0's so far i have
Regex r= new Regex(@"^(.*?)(\d+)(\D*)$");
but that doesn't work for when i have 0001...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.