From: "Peña, Botp" Date: 2002-10-22T20:40:02+09:00 Subject: Re: newby asks: giving regexps as argument for funvtions > ts [mailto:decoux@moulon.inra.fr] assisted > ... > If you want to give it a String > > def findPosRE(str, re) > m = %r{#{re}}.match(str) ^^^^^^^^^^^^^ I get a syntax error here, sir Guy. If I replace the first nest {} with () (parens), it works fine. I'm running it on irb v0.7.4 > m.begin(0) > end > > pos = findPosRE ("hey you behind the wall", "behind") >