Hi,
I am new to regular expressions, I am having a problem regarding matching a specific keyword in certain condition.
string regexstring="\\bhtml\\b|[.]net\\b";
Regex rgx = new Regex(regexstring, RegexOptions.IgnoreCase);
MatchCollection matcol = null;
string st_data = "I am a .net developer, but also know about asp.net, vb.net ; I work on c#/asp.net platform. I also know dhtml, html4.0, html/xml etc etc.";
//I want the regex to capture all occureneces for html where html is a word seperated \b-->word boundary or is surrounded by decimals like html4.0 above.
st_data = System.Web.HttpUtility.HtmlDecode(Regex.Replace(st_data, @"<(.|\n)*?>", string.Empty));
matcol = rgx.Matches(st_data);
foreach (Match mat in matcol)
{
//I WILL GET the mat.value here.
}
I tried various variations but of no use.
I want to match html4.0 but some how I need only html out of it.kind of substringed match.
I hope You understand my point.
Please help
any help shall be appreciated.
Thanks
shankbond