Anyone keen to show me how to get the integer part from this string using c#?
string url = "/{localLink:1301}";
I’ve been into using something like this but didn’t get it to work properly
var getNumeric = new Regex(".*([0-9]+)");
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your expression could be as simple as
\d+, given the assumption that there will be only one number in your input. Still under that assumption, usingToStringon the resulting Match will give you what you are looking for.