Tuesday, 13 August 2013

regex check for only these carrot characters

regex check for only these carrot characters

What's the regex for just these characters <>. I was doing something like
this which checks for to make sure only these are used.
function validateSpecialCharacters( value ){
var regex = /^\s*[a-zA-Z0-9,\s]+\s*$/;
return (regex.test(value)) ? true : false;
}
Instead I want to check if < or > is been used if so return true

No comments:

Post a Comment