remove all non-alphabet characters

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Okram
Posts: 24
Joined: 02 Oct 2013, 16:53

remove all non-alphabet characters

19 May 2016, 10:31

Hi, I have a string and want to remove all non-alphabet characters. I tried the RegEx below but it also removes characters from cyrillic alphabet. Any idea how to remove non-alphabet characters in any language?

Code: Select all

var := RegExReplace(var, "i)[^a-z]")
IMEime
Posts: 750
Joined: 20 Sep 2014, 06:15

Re: remove all non-alphabet characters

19 May 2016, 10:44

Cyrillic script in Unicode
256 characters

Code: Select all

"[\x{0400}-\x{04FF}]"
User avatar
sinkfaze
Posts: 616
Joined: 01 Oct 2013, 08:01

Re: remove all non-alphabet characters

19 May 2016, 10:49

Try this:

Code: Select all

var :=   RegExReplace(var,"\PL")
IMEime
Posts: 750
Joined: 20 Sep 2014, 06:15

Re: remove all non-alphabet characters

19 May 2016, 10:58

PL
Nice tip.
Thanks.
Okram
Posts: 24
Joined: 02 Oct 2013, 16:53

Re: remove all non-alphabet characters

19 May 2016, 13:02

Thank you very much.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], Ineedhelplz, Spawnova and 235 guests