c# - get only integer value from string -


i need last number string. string contains pattern of string+integer+string+integer i.e. "gs190pa47". need 47 string.

thank you

a simple regular expression chained end of string number of integer digits

string test = "gs190pa47"; regex r = new regex(@"\d+$"); var m = r.match(test);  if(m.success == false)     console.writeline("ending digits not found"); else     console.writeline(m.tostring()); 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -