CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Regular Expressions:
Matching unclosed quotes


New User

Sep 9, 2002, 2:33 AM

Post #1 of 2 (7084 views)
Matching unclosed quotes Can't Post

Hi all,

I'm trying to find a way to match *unclosed* quotes in HTML tags, and forcibly close them just before the closing angular bracket - that is, convert <a href="blabla> into <a href="blabla"> and <img src='blabla> into <img src='blabla'> - only, I can't seem to find a way to do it... I hoped there would be an easy "negate backreference" trick, but that doesn't seem the case...

If anyone could help (even by pointing at a resource), I'd be most grateful...



Sep 9, 2002, 3:28 AM

Post #2 of 2 (7083 views)
Re: [pgcd] Matching unclosed quotes [In reply to] Can't Post

don't do it using regular expressions.

use HTML::Parser and family (what i would do),
or try something like Text::Balanced (i wouldn't)


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives