[Ruby] regex question
Aaron Patterson
aaron_patterson at speakeasy.net
Mon Feb 12 17:54:58 PST 2007
On Mon, Feb 12, 2007 at 05:44:54PM -0800, shaners becker wrote:
>
> this worked. thanks so much. this is why i like this mailing list so
> much.
>
> > Thats because the match was greedy. Try this:
> > <recommendations>(?m).*?</recommendations>
>
> this did not.
>
> > Or this:
> > <recommendations>(?m)[^>]*</recommendations>
>
> regex are my next big project to wrap my head around.
Oops. You're right. It should have been this
<recommendations>(?m)[^<]*</recommendations>
I hit the wrong key. :-)
--
Aaron Patterson
http://tenderlovemaking.com/
More information about the Ruby
mailing list