From: "Peña, Botp" Date: 2008-12-08T18:21:50+09:00 Subject: Re: A quetion about ruby string From: Zhao Yi [mailto:youhaodeyi@gmail.com] # How can I change a string to regular expression? Take this # method for an # example: >qri Regexp#new ----------- Regexp.new(string [, options [, lang]]) => regexp Regexp.new(regexp) => regexp Regexp.compile(string [, options [, lang]]) => regexp Regexp.compile(regexp) => regexp ----------- Constructs a new regular expression from pattern, which can be either a String or a Regexp (in which case that regexp's options are propagated, and new options may not be specified (a change as of Ruby 1.8). If options is a Fixnum, it should be one or more of the constants Regexp::EXTENDED, Regexp::IGNORECASE, and Regexp::MULTILINE, or-ed together....