I have a textbox on a web form that I have the follow java code to enable a button only when the tilde key is entered. The problem I have is I cannot enter the \ or the ] keys without causing an error in the code logic. Here is the java code if (/^[a-zA-Z0-9- `!@#$%^&*()_+-={}|:"'?><?|\[]*$/.test(str) == false) {. My second question is there a way to do this in the code behind?
Thanks in advance,
Kevin