开发者

regex to exclude certain special characters

I am looking for a regex...I am validating i开发者_开发问答t on the client-side(javascript)

accepts all characters/number and all other special charaters except 3 special characters such as '÷' , 'ç' and þ. I am just a beginner please help.


^[^÷çþ]+$

Use it like this: Demo.


Find the unicode number for these characters (using your debugger to cast them to an int, or using a program called charmap.exe). The division symbol looks like F7 in hex. Then, you can use this format for your regex:

\u00F7
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜