Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
OK I have searched and searched here and can't find a solution for this. I have a string that contains copied and pasted text from word or some mac thing and it contains non ascii apostrophies and quotes. eg (all in one long string):I want to replace all the ‘ and ’ with the ascii ' and the “ and ” with the ascii " I can get rid of them with this: But I want to replace them, not remove them and can't for the life of me work out the right regex to do this. Also what reference do you use for the lookup. I have been using this: Which could be my problem. As down the track I am sure I will want to replace things like ä with a etc as well. Thanks. In reply to Replacing non ascii in string by IanD
|
|