I have a line like this: "سلام علیکم", which is a two-word Arabic phrase. I want to combine the first word with a regular expression. If it were English, I would check /^[a-zA-Z]*/ . how can i do this with arabic?
/^[a-zA-Z]*/
You can create a character class that matches only the Arabic language:
/^[\p{Arabic}]*/
Here is the full link
Arabic characters:
'\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC'