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

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

ruby on rails - Authlogic - how to make a registration and don't log in the new account? -