How Do I Extract Greek Text from My Source Text?

Hey Michael @JMichaelTX, could you perhaps lend me a hand on this? :slightly_smiling_face:
I tried using your version of this macro to extract greek text from the source input, but I couldn't get the regex right. The range of possible characters is the following:


And the text will most likely be a webpage (exemple) full of English words and a list of greek words which I will turn into a comma separated string of greek words.

Have you tried using the RegEx metacharacters for Greek text:

To match all Greek words in the source text, just prefix with \b for a word boundary:

For RegEx Details, see:

If you use a KM For Each Action with RegEx Substring collection, you should be able to build your comma delimited list.


I had no idea this was possible. Thank you very much!
I spent quite a while fumbling with regex to no avail, but this now works perfectly.

I guess I took the lazy road and used BBEdit's text factory instead.
It replaces "\n" with ",".

One last thing: I notice that you can't enter greek words on the get URL macro. The box will turn red and it stops working. I imagine it must be some protection against non-standard characters within the URL, but I am not sure there is a good reason for keeping greek letters out.

1 Like

It's not any kind of protection - it is simply that the URL is invalid. The URL must be properly encoded, and the system URL API (which Keyboard Maestro uses) is quite strict on the requirements that the URL be properly encoded.