Naresh Naresh - 1 month ago 5x
C# Question

Regular expression to extract characters in between other characters

I have a string which is


And I need a regular expression to extract the character in between


Using RegEx:

Regex g;
Match m;
g = new Regex("//(.*)\n");  // if you have just alphabet characters replace .* with \w*
m = g.Match(input);
if (m.Success == true)
    output = m.Groups[1].Value;