http://qs1969.pair.com?node_id=507680


in reply to Re^2: Parsing HTML tags with regex
in thread Parsing HTML tags with regex

m# < ## start with < ( ## group start [^">]+ ## text but Not match " and > (?:"[^"]+")* ## if " found, match till end quote found. Its optional [^>]+ ## text but Not match and > ) ## group end > ## End with > #

Replies are listed 'Best First'.
Re^4: Parsing HTML tags with regex
by jithoosin (Scribe) on Nov 11, 2005 at 12:21 UTC
    Hi gopal,
    There is a problem if the input string is my $line = "<select name=\"url><23\" style=\"width><A125px\"  >";
    .But i think a slight modification to your previous answer will do the job then #$line =~ m#<([^">]+(?:"[^"]+")*)*[^>]+>#; IS there any problem.Also provide me an asnwer for the question about <!--->--->thing