I want to convert the matched expression in string or int. But in .NET Framework I do not find any method to do this. I've tried this
s=+OK 58 exists;
var m = Regex.Match(s, @"\+OK (?[0-9]+)");
Console.WriteLine("Total Email: " + m.Groups["totalemail"].Value);
string s1= Convert.ToString(m.Groups["totalemail"].Value);
Console.WriteLine(s1);
This first writeline prints 58 and the second WriteLine() call prints nothing that means s1="".
If I use int conversion like this
int s=Convert.ToInt32(m.Groups["totalemail"].Value);
then it shows error
Input String is not in correct format.
Is it possible to convert matched regular expression to string or int? if possible please give help. Thanks in advance.
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)