You can test whether all (or some) of the characters are Thai characters with Asc keyword. You should first find the Unicode values of Thai characters.
You do not need to use Regex for this. You should check the value returned from Asc(SomeCharacter) and see whether it is in the block of Thai characters.
Something like:
B4X:
Sub IsThai(s As String) As Boolean
For i = 0 To s.Length - 1
Dim codePoint As Int = Asc(s.CharAt(i))
If codePoint >= 0x0E00 AND codePoint <= 0x0E7F Then Return True
Next
Return False
End Sub
Hi Erel,
I have ever seen Java using Pattern, Pattern="[ก-ฮ0-9ฯ-๙]*"
I don't know that Can I use pattern with regex()? If I can,then
if I define "เอาะ"="-oh" then "เกาะ"="Koh" too. How to coding?
Hi Erel,
Is there a possibility or not that made error?,If I check many languages in your strategy post #4. I mean that data of langauges used in the same location between 0x0E00-0x0E7F.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.