$re = join "|", map quotemeta, @column
Shameless plug - I recently wrote the node Building Regex Alternations Dynamically on exactly this topic (keep in mind it is still a draft). Also, if the number of rows in the DB is large, this may result in a giant regex.
Hope this helps,
-- Hauke D
In reply to Re^2: Generate a regex from text
by haukex
in thread Generate a regex from text
by porg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |