From: Shashank Date Date: 2002-09-18T09:08:47+09:00 Subject: Re: Regular expression bug, or feature? But it worked with the following change: src = '' # ^ # notice the last '>' src =~ /^<((?:[\w:][-\w\d.]*:)?[\w:][-\w\d.]*)\s*((((["']).*?\5)|[^\/'">]*)*?)(\/)? >/mu