Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^5: replace string

by ig (Vicar)
on May 18, 2009 at 10:43 UTC ( #764628=note: print w/replies, xml ) Need Help??


in reply to Re^4: replace string
in thread replace string

use strict; use warnings; my $input = "<b></b>Officially called <>“event +s,”</a> as "never events""; print "input: $input\n"; $input =~ s/“/“/g; # change the lines $input =~ s/”/”/gi; $input =~ s/’/’/gi; print "processed input: $input\n";

produces

input: <b></b>Officially called <>“events,&rdq +uo;</a> as "never events" processed input: <b></b>Officially called <>“e +vents,”</a> as "never events"

This was done using your REs and appears to provide the output you are looking for.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2023-12-08 15:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (36 votes). Check out past polls.

    Notices?