makafre has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
My goal is to have any character which is not within the GSM 7-bit default alphabet, to be removed from a given string. Basically it is a mixture of regular/accented/greek letters and some ponctutation. The complete character set is the first table at this URL: https://en.wikipedia.org/wiki/GSM_03.38 :
The list is:
@£$¥èéùìòÇØøÅåΔ_ΦΓΛΩΠΨΣΘΞÆæßÄÖÑܧ¿äöñüàÉ !"#¤%&'()*+,-./:;<=>?¡A-Za-z0-9Of course this is not working:
$str =~ s/[^\@£\$¥èéùìòÇØøÅåΔ_ΦΓΛΩΠΨΣΘΞÆæßÉ !"#¤%\&\'\(\)\*\+\,\-\.\/0-9:;<=>\?¡A-ZÄÖÑܧ¿a-zäöñüà]//g;I searched for hours on how to do this and I am seeking your knowledge on which direction to take to accomplish this. (it seems that the site replaced some of the above characters with HTML code, sorry for this)
Thank you
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to replace all non GSM 7-bit default characters?
by Perlbotics (Archbishop) on Dec 02, 2018 at 18:02 UTC | |
by makafre (Initiate) on Dec 03, 2018 at 00:32 UTC | |
Re: How to replace all non GSM 7-bit default characters?
by kcott (Archbishop) on Dec 04, 2018 at 07:57 UTC |
Back to
Seekers of Perl Wisdom