in reply to Re^2: extracting link *and* tag content from "a href"
in thread extracting link *and* tag content from "a href"

well it worked on his examples :) What's the point? the point is to try and reinvent the wheel. Why would I want to reinvent the wheel? why not, if I'm getting paid :) then I learn things too, such as the mistakes you pointed out.

Of course, I was working under the assumption that the links are valid html, of which none of the examples you nor the thread author provided are. Anything not matching [a-zA-Z0-9], such as quotes, anglebrackets,etc. should be urlencoded if put in a url.

in any case, you're right it's still broken for some cases. downvote away :)

Replies are listed 'Best First'.
Re^4: extracting link *and* tag content from "a href"
by BUU (Prior) on Jul 19, 2004 at 20:41 UTC
    That'll teach me to take the easy way out! Anyways, I'm glad we've agreed that it's broken =]. The second example *is* valid though, as far as I know. In the future if you'd just said "This is a learning exercise, please use one of the modules" I wouldn't have had any problems.
      The second example is not valid HTML. The quotes are optional when the value contains only letters, numbers, period, and hyphens, </code>0-9A-Za-z.-</code> basically. Browsers and some parsers will work around broken markup, but many won't.