Using the follo开发者_如何转开发wing regex with the ExtJS library, the intention is to only allow spaces, dollar signs, underscores, alpha and numeric characters. However, for some reason, the vertical bar/ pipe character is allowed as well. I hope someone can tell me what I am missing here. Am I inadvertently escaping one of the vertical bars?
maskRe:/^[a-z|A-Z|0-9|$|_ ]$/
Thank you kindly for your time!
You don't need the vertical bars inside your character class. Try the following instead:
maskRe:/^[a-zA-Z0-9$_ ]$/
精彩评论