in reply to Alternation vs. looping for multiple searches.

there's always another could construct and then eval code that tests the regexes one by one in sequence, shortcircuiting on first match found. you'd usually arrange to have the most common case first and least common case last, so that it short circuits at earliest opportunity.
/$regex1/ or /$regex2/ or /$regex3/......etc
the hardest line to type correctly is: stty erase ^H