Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Parsing HTML tags with regex

by gopalr (Priest)
on Nov 11, 2005 at 10:09 UTC ( #507680=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://507680]
help
Chatterbox?
[chacham]: Re: Re: pattern matching -- feeling stoopit a poll idea about centrists, is +8 -5, used to be +6/-6 how apropos :)is +8
[chacham]: ...errr... Re: poll ideas quest 2015 (political centrist)
[chacham]: ooh, late, nighty nite everybody
[jdporter]: thanks, 1nickt1

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (13)
As of 2017-05-24 21:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?