Enjoy Our Blog

Our most loved regular expressions

Our most loved regular expressions

We have decided to share our most commonly used Regular expressions to dealing with HTML documents. Regex to find text url’s in the HTML document: "(?<url>((?<protocol>http(s)?)\:\/\/)?.+?[^\n\]\s])" Regex to find HTML links in the HTML document: "\<(a|area|url).*? href\=((""(?<url>((?<protocol>http(s)?)\:\/\/)?[^""]*)"")|('(?<url>((?<protocol>http(s)?)\:\/\/)?[^']*)'))" Regex to find […]