Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: How to remove other language character from a string

by kcott (Abbot)
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


Comment on Re: How to remove other language character from a string
Select or Download Code

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 having an uproarious good time at the Monastery: (15)
As of 2014-11-26 15:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (171 votes), past polls