Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I want to remove all the other languages from my sentence and grep only English alphabet.
e.g : ครัวซองเเซนด์วิชไข่ดาว Croissant Egg Sandwich ครัวซองเเซนด์วิชไข่ดาวAssuming this as an example,my code is like this :
But the output is the same string, I want only 'Croissant Egg Sandwich' as output. Please help me out in this.$image ='ครัวซองเŬ +8;ซนด์วิชไข$ +56;ดาว Croissant Egg Sandwich ครั +วซองเเซนด์ +;วิชไข่ดาว'; $image =~s/\p{Thai}//; print $image;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to remove other language character from a string
by moritz (Cardinal) on Nov 26, 2012 at 05:27 UTC | |
by Anonymous Monk on Nov 26, 2012 at 05:36 UTC | |
by frozenwithjoy (Priest) on Nov 26, 2012 at 05:51 UTC | |
by Anonymous Monk on Nov 26, 2012 at 09:53 UTC | |
|
Re: How to remove other language character from a string
by Tux (Canon) on Nov 26, 2012 at 07:00 UTC | |
|
Re: How to remove other language character from a string
by grondilu (Friar) on Nov 26, 2012 at 05:50 UTC | |
|
Re: How to remove other language character from a string
by kcott (Archbishop) on Nov 26, 2012 at 08:29 UTC | |
|
Re: How to remove other language character from a string
by Anonymous Monk on Nov 26, 2012 at 09:54 UTC |