Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3:Looking for a module that strips an HTML tag and its associated 'TEXT'

by Anonymous Monk
on Jul 29, 2020 at 13:48 UTC ( #11119968=note: print w/replies, xml ) Need Help??


in reply to Re^2: Looking for a module that strips an HTML tag and its associated 'TEXT'
in thread Looking for a module that strips an HTML tag and its associated 'TEXT'

quite the dependency chain you added just for this.
  • Comment on Re^3:Looking for a module that strips an HTML tag and its associated 'TEXT'

Replies are listed 'Best First'.
Re^4: Looking for a module that strips an HTML tag and its associated 'TEXT'
by nysus (Parson) on Jul 29, 2020 at 13:56 UTC

    It turns out it doesn't even do what I need. And now I just tried https://metacpan.org/pod/HTML::Scrubber and it doesn't seem to work, either.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks

        I want the code to pass these simple tests:

        # eliminate_tags is(eliminate_tags("url: <a href=\"http://example.com/\">http://example +.com/</a>", 'a'), "url: "); is(eliminate_tags("<div>\n <p>hoge foo.</p>\n <p>bar tarao.</p>\n</d +iv>", 'p'), "<div>\n \n \n</div>"); # eliminate_links is(eliminate_links("url: <a href=\"http://example.com/\">http://exampl +e.com/</a>"), "url: "); is(eliminate_links("<div>\n <p>hoge foo.</p>\n <p>bar tarao.</p>\n</ +div>"), "<div>\n <p>hoge foo.</p>\n <p>bar tarao.</p>\n</div>");

        $PM = "Perl Monk's";
        $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
        $nysus = $PM . ' ' . $MCF;
        Click here if you love Perl Monks

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2021-11-29 12:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?