From: Guillermo Riojas Date: 2010-11-23T03:45:06+09:00 Subject: Re: Multi-line regular expression match question Ammar Ali wrote in post #962576: > On Fri, Nov 19, 2010 at 3:50 PM, Ammar Ali > wrote: >> >> If you're using ruby 1.9 you can do us that, *? is the reluctant version of *: >> >>  /^\|-:$.*?^-\|$/m > > ---8<--- > >> If you're on 1.8, one possibility is: >> >>  /^\|-:$(?m:.*?)(?=^-\|)^-\|$/ > > I was under the impression that the reluctant versions of the four > quantifiers was only available under ruby 1.9, but they are apparently > available under 1.8 as well. I used it in the example I showed for 1.8 > without noticing. > > Regards, > Ammar Thanks for clarification Ammar, it works perfectly, and also for the book recommendation very useful , thanks a lot guillermo -- Posted via http://www.ruby-forum.com/.