What is a good way to tell whether a string contains text in a Right To Left language.
I have found this question which suggests the following approach:
On my implementation of regex I could not use neither \u, \x, nor {} language named groups.
So I built my own pattern programatically based on all "R" and "AL" (RandALCat) bidirectional characters as listed in UnicodeData.txt.
[־׀׃א-״؛-ي٭-ەײַ-ﳝﶈ-ﷺﺂ-ﻼ]
This should be decently comprehensive and I've tested it on Arabic and Hebrew text so far.