From: Ken Bloom Date: 2006-11-14T03:15:05+09:00 Subject: Re: regular expression too big Simon Strandgaard wrote: > On 11/12/06, Peter Schrammel wrote: >> got problem with big regexes: >> I have a regex of about 70000+ words concated with '|' that I'd like to >> match as a regex. /bla|blub|foo|bar|.....(70000)/ > > if you have many words to check for then consider using a > http://en.wikipedia.org/wiki/Bloom_filter There's even a library for doing Bloom filters: http://raa.ruby-lang.org/project/rbloomfilter/ (Bloom filters were invented by Burton Bloom, who is not even remotely related to me) -- Ken Bloom. PhD candidate. Linguistic Cognition Laboratory. Department of Computer Science. Illinois Institute of Technology. http://www.iit.edu/~kbloom1/