I see only one caveat: if the character "I" can occur in your original array, you will have to escape that. Something like:
And yes, I prefer # over / for regexes to avoid the falling toothpick syndrome.$tomatch = join( '|',map {s#|#\\|#s; $_} @results );
Liz
In reply to Re: Creating regex from arrays
by liz
in thread Creating regex from arrays
by debiandude
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |