in reply to regex to match one nasty javascript line

well... I'm not sure if this one will always work, it's just a quick and dirty hack - as soon as there is another ) within the url or something, it's bound to break. It will also not work if there is a document.write line above this one.

Let's divide the whole thing into a couple of steps first.
  1. Get the document.write line
  2. Get rid of the '+' things
  3. Only get the actual url, not the rest of that stuff
Well, here goes..

my ($url) = $website =~ m/document\.write\((.+?)\)/; $url =~ s/'\+'//g; ($url) = $url =~ m/src="(.+?)">/;