Changes

Jump to: navigation, search

Removing Special Characters

307 bytes added, 15:02, 27 April 2009
no edit summary
==Options==
For Search Expression you can use
* \W = Matches any character that is '''not ''' a word character from the basic Latin alphabet. Equivalent to [^A-Z a-z 0-9 _]
* \w = Matches any alphanumeric character from the basic Latin alphabet, including the underscore. Equivalent to [A-Za-z0-9_]
* \' = single quotes
* g = global match
* i = ignore case
 
 
Using ''onChange'' will replace the characters as soon as the user clicks in a field other than the current field, or hits save.<br>
Using ''onKeyup'' will replace the characters as soon as they are typed.
 
 
==Examples==
'''1. To remove all characters that aren't part of the basic Latin alphabet and 0-9 ('''such as . , & ; : ~ ! @ # $ % ^ & * ( ) + " ' and the space key''' characters ) and replace them with an underscore (_) actively while typing the text.
<pre>
onkeyup=javascript:this.value=this.value.replace(/[\W]/g,'_');
0
edits

Navigation menu