I have an input where I want to test if the inserted text is only in Arabic characters as following :
ng-pattern="/^([\u0600-\u06ff]|[\u0750-\u077f]|[\ufb50-\ufbc1]|[\ufbd3-\ufd3f]|[\ufd50-\ufd8f]|[\ufd92-\ufdc7]|[\ufe70-\ufefc]|[\ufdf0-\ufdfd]|[ ])*$/g"
this input works and accepts only Arabic values but it only accepts values that have a length of an odd number, for example when I type : عماد
which has 4 characters it wont work but when I type : أسماء
which has 5 characters it works.
this is my jsfiddle :
so why do I get this behavior ?