View Full Version : maskRe for a textfield

12 Aug 2012, 10:53 PM
Hi all. I have a textfield and I`m using this maskRe maskRe: /^([a-zA-Z0-9_\s\-]*)$/, to allow users type only english alphabet characters, but I also need to allow them type characers from their own language like:
, , , and some other characters from Turkish and Serbian alphabet also.

Can you please tell me how can I build a maskRe for doing that?

Thank You and I hope you will help me!

13 Aug 2012, 3:18 AM
Can you try this reg:

maskRe: /^([a-zA-Z0-9{,?,,?,}_\s\-]*)$/,

14 Aug 2012, 1:45 AM
Thank you for your answer. I tried this but it didn`t work for me. I found the solution in this way:
maskRe: /^([a-zA-Z0-9_\s\-\\\\]*)$/

11 Sep 2012, 6:39 AM
I have a text field with this maskRe and ERgular Expression:

maskRe: /^([0-9 \/]*)$/
regex: /^[0-9]*([0-9]*\/?[0-9]*)[0-9]$/

I need to allow user write a string in this form: number/number.
It allows only one '/' and starts with number and ends with number

Can you help me because the regEx above it`s not working as it should