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_n um.*?>(.*?)</td>",
RegexOptions.Ig noreCase);
string unit_num = reg_unit_num.Ma tch(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_n um.*?>(.*?)</td>",
RegexOptions.Ig noreCase);
string unit_num = reg_unit_num.Ma tch(strHTMLPage ).Result("$1");
Comment