Possible Duplicate:
RegEx match open tags except XHTML self-contained tags
string regex = "<Name[.\\s]*>[.]*s[.]*</Name>";
string source = "<Name xmlns=\"http://xml.web.asdf.com\">Session</Name>";
bool hit = System.Text.RegularExpressions.Regex.IsMatch(
source,
regex,
System.Text.RegularExpressions.RegexOptions.IgnoreCase
);
Why is hit
false? I'm trying to find any Name
XML field that has an 's'
in the name. I don't understand what could be wrong.
Thanks!