From: Christian Kruse Date: 2002-03-24T07:22:43+09:00 Subject: Re: extracting multi-line tags? Hoi, On Sun, 24 Mar 2002 04:47:28 +0900 Tobias Reif wrote: > > NOTE: What I mean here is that I would like to match the beginning of the > > a href tag as one "token", then put the contents of the tag in another > > token, while putting the closer tag in yet another token. [...] > ---------8<---------- > a = ' href="http://foo"> > foo > > ' > a =~ /()(.+?)(<\/a>)/m When Ruby's RE-Engine works a little bit like Perls, a RegEx like /(]*>)(.+?)(<\/a>)/ Will be faster and more efficient. Greets, CK