'Filter URLs' action for Safari question..

Hi,

I have a question regarding the ‘Filter URLs’ action for Safari, I have two criteria that I would like the filter to look for, either names containg ‘md’ or ‘lg’, but how can I enter that as a parameter in the ‘Filter URL’ field? It does not seem to accept “‘md’ ‘lg’”, or “‘md’ OR ‘lg’” - any suggestions?

otherwise, how I would write an applescript that would filter the URLs?

Thanks!