-1

I want Regular Expression to accept only Arabic characters and Numbers, Spaces, English characters and Numbers, and (.,:"()-_?)

I found the following expression allow all above except (.,:"()-_?) :

ValidationExpression="[^~`!@#$%\^&\*\(\)\-+=\\\|\}\]\{\['&quot;:?.>,</]+"
stuartd
  • 70,509
  • 14
  • 132
  • 163
  • 1
    Let's hope you didn't Google search, or your Google has problems. See [Regular Expression Arabic characters and numbers only](https://stackoverflow.com/questions/29729391/regular-expression-arabic-characters-and-numbers-only); it only needs a tweak or two to match your case. – code May 28 '22 at 18:50
  • Don't html encode a doublequote (`"`) like `"`, use escape instead: `\"`. – Poul Bak May 28 '22 at 19:33

1 Answers1

0
"[^a-zA-Z0-9\u0621-\u064Aa\u0660-\u0669\s\)\(\-\.\:\"\?_,]+"

would allow arabic characters and numbers then english characters and numbers then the special characters I think you want. \u0660-\u0669 checks for arabic numbers and \u0621-\u064A checks for arabic characters. Let me know if this works and whether or not I interpreted you correctly.