wfsp has asked for the wisdom of the Perl Monks concerning the following question:
The ’ could be anywhere in the string.my $str = q|cat’s|; $str =~ s/\x092/'/; print "$str\n"; # outputs: # cat’s
winxp/activestate 5.8.7.
Thanks in advance
Update:
\x{092} produces the same result
Udate 2
The same (with or without the braces)$str =~ tr/\x{092}/'/d;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Removing \x092 with a regex
by kwaping (Priest) on Jul 26, 2005 at 15:10 UTC | |
by wfsp (Abbot) on Jul 26, 2005 at 15:15 UTC | |
|
Re: Removing \x092 with a regex
by davido (Cardinal) on Jul 26, 2005 at 15:47 UTC | |
|
Re: Removing \x092 with a regex
by polettix (Vicar) on Jul 26, 2005 at 16:52 UTC | |
by wfsp (Abbot) on Jul 26, 2005 at 17:09 UTC | |
by tye (Sage) on Jul 26, 2005 at 17:12 UTC | |
by wfsp (Abbot) on Jul 26, 2005 at 17:24 UTC | |
|
Re: Removing \x092 with a regex
by Anonymous Monk on Jul 26, 2005 at 14:57 UTC |