Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: How to remove other language character from a string

by kcott (Canon)
on Nov 26, 2012 at 08:29 UTC ( #1005588=note: print w/ replies, xml ) Need Help??


in reply to How to remove other language character from a string

You could use the transliteration operator (y/// or tr///) - see Quote-Like Operators.

$ perl -Mstrict -Mwarnings -E '
my $x = q{ครัวซองเเซนด์วิชไข่ดาว Croissant Egg Sandwich ครัวซองเเซนด์วิชไข่ดาว};
$x =~ y/ -~//cd;
say $x;
'
 Croissant Egg Sandwich 

-- Ken

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2016-06-27 15:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (339 votes). Check out past polls.