T
tdmailbox
I have the following regular expression. It works fine if the regex
code returns a match. However if not the .match code fails.
How can I code this so that it skips the match if the regular
expression does not find anything?
Regex reg_unit_num = new Regex("L_unit_num.*?>(.*?)</td>",
RegexOptions.IgnoreCase);
string unit_num = reg_unit_num.Match(strHTMLPage).Result("$1");
code returns a match. However if not the .match code fails.
How can I code this so that it skips the match if the regular
expression does not find anything?
Regex reg_unit_num = new Regex("L_unit_num.*?>(.*?)</td>",
RegexOptions.IgnoreCase);
string unit_num = reg_unit_num.Match(strHTMLPage).Result("$1");