Thread Regex - Suche nach Tags (7 answers)
Opened by YAPD at 2021-06-01 18:31

Linuxer
 2021-06-01 21:04
#193339 #193339
User since
2006-01-27
3890 Artikel
HausmeisterIn

user image
Dann speicher das Ergebnis der Suche in einem Skalar und übergebe eine Referenz auf diesen an HTML::TokeParser.

perldoc HTML::TokeParser
Description
...
Code: (dl )
1
2
... 
$p = HTML::TokeParser->new( \$document, %opt );


The object constructor argument is either a file name, a file handle object, or the complete document to be parsed. Extra options can be provided as key/value pairs and are processed as documented by the base classes.

If the argument is a plain scalar, then it is taken as the name of a file to be opened and parsed. If the file can't be opened for reading, then the constructor will return undef and $! will tell you why it failed.

If the argument is a reference to a plain scalar, then this scalar is taken to be the literal document to parse. The value of this scalar should not be changed before all tokens have been extracted.

Otherwise the argument is taken to be some object that the HTML::TokeParser can read() from when it needs more data. Typically it will be a filehandle of some kind. The stream will be read() until EOF, but not closed.


Schon versucht?

Doku: CPAN:HTML::TokeParser
meine Beiträge: I.d.R. alle Angaben ohne Gewähr und auf Linux abgestimmt!
Die Sprache heisst Perl, nicht PERL. - Bitte Crossposts als solche kenntlich machen!

View full thread Regex - Suche nach Tags