hi
can anyone give me the code for extrating text between tags using regex function.
say theodore i need only theodore.
i use regex functions. can anyone help?
hi
can anyone give me the code for extrating text between tags using regex function.
say theodore i need only theodore.
i use regex functions. can anyone help?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AlanPosted Aug 5, 2008, 2:10 PM
This should do it:
using System;
using System.Text.RegularExpressions;
class Program
{
static void Main()
{
string html = " theodore ";
Regex r = new Regex("(.*)?");
foreach (Match m in r.Matches(html))
{
Console.WriteLine(m.Groups[1].Value.Trim());
}
Console.ReadLine();
}
}