On Fri, 4 Feb 2011 18:10:08 -0600 Ted Zlatanov <[email protected]> wrote: 

TZ> On CPAN you can find Regex::Trie which builds this regex in a more
TZ> optimized way
TZ> (http://search.cpan.org/~dankogai/Regexp-Trie-0.02/lib/Regexp/Trie.pm).
TZ> This is the most general solution.

Oh, and for the Emacs fans, this is a very useful obfuscation facility :)

(regexp-opt '("a" "beta" "quorum" "alpha"))

=> "\(?:a\(?:lpha\)?\|beta\|quorum\)"

Ted

_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to