Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: How to remove other language character from a string

by Tux (Monsignor)
on Nov 26, 2012 at 07:00 UTC ( #1005581=note: print w/ replies, xml ) Need Help??


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

If what I read is actually your code, you'll need HTML::Entities and a /g modifier to s///:

$ cat test.pl use 5.14.1; use warnings; use HTML::Entities; my $image; $image ='ครัวซองเ&#364 +8;ซนด์วิชไข&#36 +56;ดาว Croissant Egg Sandwich ครั +วซองเเซนด&#3660 +;วิชไข่ดาว'; $image = decode_entities ($image); $image =~ s/\p{Thai}//g; print $image; $ perl test.pl Croissant Egg Sandwich $

Enjoy, Have FUN! H.Merijn


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://1005581]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2014-10-26 08:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (152 votes), past polls