Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Better way of finding HTML tags positions in HTML string

by holli (Monsignor)
on May 14, 2019 at 17:24 UTC ( #1233777=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    /* vim: set sw=8 ts=8 si noet: */
    
    ...
    
        /* end of file */
    
  2. or download this
    HTML::TagReader
    tr_new_from_io(class, pio)
    ...
        RETVAL->tagline=0;
    OUTPUT:
        RETVAL
    
  3. or download this
    my $str = "<blockquote>\n<i>Perlmonks</i>\n</blockquote>\n";
    open my $io, "<", \$str;
    ...
        print "line: $tag[1]: col: $tag[2]: $tag[0]\n";
    }
    
  4. or download this
    line: 1: col: 2: <blockquote>
    line: 2: col: 1: <i>
    line: 2: col: 13: </i>
    line: 3: col: 1: </blockquote>
    
  5. or download this
    my $str = "<blockquote>\n<i>Perlmonks</i>\n</blockquote>"; #no newline
    + at the end
    open my $io, "<", \$str;
    ...
        print "line: $tag[1]: col: $tag[2]: $tag[0]\n";
    }
    
  6. or download this
    line: 1: col: 2: <blockquote>
    line: 2: col: 1: <i>
    line: 2: col: 13: </i>
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1233777]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2019-09-18 04:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The room is dark, and your next move is ...












    Results (222 votes). Check out past polls.

    Notices?