Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^5: substitution in textual area of HTML file

by marto (Archbishop)
on Mar 10, 2020 at 19:29 UTC ( #11114098=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    
    $dom->find('span')->each( sub { $_->content( $_->content =~ s/Spoken/D
    +erp/r ) } );
    say $dom->content;
    
  2. or download this
    <ul><div class="txt" style="position:absolute; left:84px; top:73px;"><
    +span id="f1" style="font-size:11px;vertical-align:baseline;color:rgba
    +(0,0,0,1);">technology of S2S translation, <b>also</b> known as <b>De
    +rp</b> Language Translation (SLT),</span></div><div class="txt" style
    +="position:absolute; left:44px; top:73px;"><span id="f1" style="font-
    +size:11px;vertical-align:baseline;color:rgba(0,0,0,1);">is a new appl
    +ication of AI,</span></div><li>there</li><li>everyone</li></ul>
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2020-07-06 13:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?