I have a regex that works. However I want it to drop matches that have a specific word.
/\<meta[^\>]+(http\-equiv[^\>]+?refresh[^\>]+?(?<!\-)(?<!\d)[0-9]\d*[^\>]+?url[^\>]+?|(?<!\-)(?<!\d)[0-9]\d*[^\>]+?url[^\>]+?http\-equiv[^\>]+?refresh[^\>]+?)\/?\>/is
This matches the following: (http-equiv and url in any order)
<meta http-equiv="refresh" content="21;URL='http://example.com/'" />
<meta content="21;URL='http://example.com/'" http-equiv="refresh" />
I want to exclude any url that has ?PageSpeed=noscript
a. <meta content="21;URL='http://example.com/?PageSpeed=noscript'" http-equiv="refresh" />
b. <meta content="21;URL='http://example.com/segment?PageSpeed=noscript&var=value'" http-equiv="refresh" />
Any ideas are much appreciated. Thanks.