From: George George Date: 2009-10-15T15:24:35+09:00 Subject: matching against a zillion patterns i have some script in which i would like to match a string against 'many' regular expressions patterns. def group(string) if string=~ /pattern1 |patter2|pattern3|pattern(N)/ #where N =>100 group =1 else .... end end My worry is the amount of patterns that i have (exceeding 400) and the efficiency and sanity of such an approach.What would you advice? Thank you. -- Posted via http://www.ruby-forum.com/.