Friday, June 28, 2013

Regular expression on XML attributes

These expressions will work better!



private static readonly Regex GetHtmlTextRegex = new Regex("text=\"([^\"]*)\"", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase);
private static readonly Regex GetTextRegex = new Regex("<[^>]*>([^<]+)<[^>]*/[^>]*>", RegexOptions.Compiled | RegexOptions.Singleline);



I'm sorry for only now have realised.


No comments:

Post a Comment