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.
any ideas?
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.
any ideas?