From: Wes Gamble Date: 2006-05-03T03:47:34+09:00 Subject: Re: Easy way to escape text for use in regexps? Sorry all. I'll look harder next time. How embarrassing. Regexp.escape() Thanks, Wes Wes Gamble wrote: > I need to be able to include some arbitrary text as input into a regular > expression and I'm looking for a way to escape regular expression > metacharacters within my data(e.g. escape a "?" for example). > > Is there a library somewhere that has this function available? > > Thanks, > Wes -- Posted via http://www.ruby-forum.com/.