One method you could use; get the number of words($0) then while loop through them one at a time and check them against a token variable that contains allowed urls.