Hi,
I want to put a condition that text field only accept Hebrew charecter, I tried to find correct regex to validate hebrew text, but did not find.
Please suggest where can i find regex for hebrew text or is there any other way to do the same.
Thanks & Regards,
ShreeKrishna Tiwari
Discussion posts and replies are publicly visible
You could add a validation to check that all characters are Hebrew. I think there is no need for any regex.
https://unicode-table.com/en/blocks/hebrew/
This snippet checks whether a given string only consists of valid characters.
a!localVariables( local!string: "abcx", local!valid: "abc", len(cleanwith(local!string, local!valid)) = len(local!string) )
Thank you for quick response,
So The way You sugeested, do I need to put all 112 hebrew charecter in one string one by one?
If the characters are in a contiguous unicode range then you could write an expression to automate this.
You can use the code() function to split a string into a list of numbers representing the Unicode number of the character, then confirm for all numbers they are greater than one value and less than the other (like the beginning and end of the Hebrew code blocks).
You may want to confirm in the unicode standard that you don't have a separate block for special Hebrew characters and punctuation. I find that Unicode usually has 2 blocks for popular languages, the rarer symbols being grouped together further down the list. I don't know if you'll need an additional block for Hebrew numbers. I know that numerals in Arabic got it's own block.
True enough, you're going to need to account for both Hebrew block starting at #0590 (that's hexadecimal) and the Hebrew Presentation Forms block starting at #FB00 (hexadecimal) Go to unicode.org.
char(1425 + enumerate(112))
Now you're just doing the work for @shreekrishnat0001 !!!
Note: it may not be that simple/may be more nuanced - there are some characters in that range that are not strictly Hebrew (Yiddish for example) and some of the cells in that range are currently empty. But, yes, the principle is you can generate a list of the valid characters using the char() function and any valid unicode ranges
Hi Stefan Helzle,
I am now able to validate Hebrew Text,
Thanks For Your Response, I realy appreciate your effort.
Note - I am new to Appian dev environment, Thanks for your help.
can you give the exact snipp of code ?