Non Width Special Character Removal
<p>Below is my HTML Code to get the input from User.</p>

<pre><code>&lt;HTML&gt;
&lt;BODY&gt;
&lt;FORM METHOD=POST onSubmit="javascript:return(exa(this.form.model.value))"&gt;

&lt;INPUT TYPE=TEXT NAME=MODEL VALUE=""&gt;
&lt;INPUT TYPE=SUBMIT NAME=SUBMIT VALUE="Next"&gt;

&lt;/FORM&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;
</code></pre>

<p>When User entered the Model name (Having zero width special characters) --> ​​PMUE4526AAAAAA</p>

<p>Below is the java script to remove the non-ascii characters. but, it's not working for me.</p>

<pre><code>function exa(myString)
{
  alert("String: "+myString);alert("String_length: "+myString.length);
  myString=  myString.replace(/[^\x20-\x7e]/g,'');
  alert("String: "+myString);alert("String_length: "+myString.length);
</code></pre>

<p>Whenever i am trying to display the value which i received from HTML, <code>"&amp;#8203;&amp;#8203;PMUE4526AAAAAA"</code> it's showing like that. so, my Java script program considers <code>"&amp;#8203;"</code> (7 characters), not a special character.</p>

<p>Please help me to fix the problem.</p>