in reply to regex to match one nasty javascript line

s/^.*src=//g;
s/'\+'//g;
s/\.jpg.*//g;
s/^"//g;
print
#publicdomain
# HINT: use a filehandle to get the string into $_, it's devilishly tricky without it...
  • Comment on Re: regex to match one nasty javascript line

Replies are listed 'Best First'.
Re^2: regex to match one nasty javascript line
by ikegami (Patriarch) on Nov 28, 2006 at 03:57 UTC
    You don't need to use a filehandle to alias $_ to something. for ($var) { ... } works nicely.