Hoi, On Sun, 24 Mar 2002 04:47:28 +0900 Tobias Reif <tobiasreif / pinkjuice.com> 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 </a> closer tag in yet another token. [...] > ---------8<---------- > a = '<a > href="http://foo"> > foo > </a> > ' > a =~ /(<a.+?href=['"](.+?)['"].*?>)(.+?)(<\/a>)/m When Ruby's RE-Engine works a little bit like Perls, a RegEx like /(<a.+?href=['"]([^"']+)['"][^>]*>)(.+?)(<\/a>)/ Will be faster and more efficient. Greets, CK