I have a Search box on my site and when ever the user types in the special character like @,#,$ etc I am replacing all the non standard character with empty space
term.replace(/[^A-Za-z]/g,” “);
in javaScript
But this code Will replace all the number from 0-9 to empty. How Do i make the search box to be include Numbers(apart from Alphabets) and only exclude Special characters.
I have a Search box on my site and when ever the user types
Share
You could try:
JS Fiddle proof-of-concept.
References: