in reply to Re: Regex question: Is there a better way?
in thread Regex question: Is there a better way?

Thanks for the HTML::LinkExtor solution.
This will accomplish the task of expanding the image urls.

But, alas, I'm trying to expand my regex ability.
It might be that there isn't a regex that will process expressions with not "http and not "/. But that's what I'm looking for.

my $content =<<"(END)"; jfds k blah="http:/stufff" fjksldf jsdf jsdlfjs jflds fjsf jfdj blah="/some other stuff" fjsd fjslf s fjs fjs fjsfj fjsd jjfd jfdjlkf blah="stuff I'm lookig for" fjdls fsf sjfks (END)
Is there a regex that will focus on blah="stuff I'm lookig for" and skip over blah="http:/stufff" and blah="/some other stuff"?

Thanks
Claude

Replies are listed 'Best First'.
Re: Regex question: Is there a better way?
by cLive ;-) (Prior) on Apr 23, 2001 at 00:31 UTC
    Your problem here is that you need to ignore quotes like:

    HREF="http://whatever" target="blank"

    being picked up. First you need to strip the HTML.

    Then run a reg exp on what's left that suit's your needs. If you're sure all quotes are 'well formed' (ie they each quote is closed), you can use something as simple as:

    /"([^"]*?)"/g

    Is this more helpful?

    cLive ;-)