c# - How to get number at the end of string? -


i want retrive number sequence @ end of string. e.g.

string contentdbindex = regex.match("ab56cd1234", @"\d+").value; 

gives me result 56 want result 1234. how should ?

you can use end anchor ($) this:

string contentdbindex = regex.match("ab56cd1234", @"\d+$").value; 

Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

php - Boolean search on database with 5 million rows, very slow -

css - Text drops down with smaller window -