Aktham Mahmoud

Aktham Mahmoud

  • 1.3k
  • 705
  • 14.6k

Problem in regex validation to match Arabic with English text

Apr 17 2021 2:13 AM
Greeting
I search long time and test many formula to validate Arabic character.
Sinario:
I have a form conatin a Text box (title) and another text box field (description)
I desigened a form to allow user to write in both languages (Arabic or English ) or in some time a paragraph conatining both of last langages.
 
first time I used this formula for my propose:
 
  1. ^[\u0600-\u065F\u066A-\u06EF\u06FA-\u06FFa-zA-Z]+[\u0600-\u065F\u066A-\u06EF\u06FA-\u06FFa-zA-Z-_]*$  
 
Arabic letters & English letters only regular expression No Numbers ? | The ASP.NET Forums 
 
 But last fomulat not work correctly.
I moved to another formula like this
 
  1. ^[\u0600-\u065F\u066A-\u06EF\u06FA-\u06FFa-zA-Z\s\w*]  
 and problem still as it.
what anyone have an idea to describe what hapening?
 
thanks