http://www.perlmonks.org?node_id=398242


in reply to Apply A Set Of Regexes To A String

Flex(1) might be a solution here. You just add rules for all the regexps you want to search for, but REJECT the ones you do not want to match.