title: How to Detect Non "GSM 7 bit alphabet" characters in input field
body: <p>I am trying to detect if a text input field has any character that doesn't belong to the GSM 7 bit alphabet. The table with the characters is here <a href="http://www.dreamfabric.com/sms/default_alphabet.html" rel="noreferrer">http://www.dreamfabric.com/sms/default_alphabet.html</a></p>
  
  <p>After a lot of searching I found this (<a href="https://stackoverflow.com/questions/2550951/what-regular-expression-do-i-need-to-check-for-some-non-latin-characters">What regular expression do I need to check for some non-latin characters?</a>) that its pretty close to what I want to accomplish because It detects Non latin characters. How can I alter the regular expression to include the GSM 7 bit alphabet?</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html lang="en-US"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;test foreign chars&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;input id="foreign_characters" size="12" type="text" name="foreign_characters" value="test"&gt;
  
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  
  (function(){
  
      $('#foreign_characters').on("keyup", function(){
  
          var foreignCharacters = $("#foreign_characters").val();
          var rforeign = /[^\u0000-\u007f]/;
  
          if (rforeign.test(foreignCharacters)) {
            alert("This is non-Latin Characters");
          } else {
            alert("This is Latin Characters");
          }
  
      });
  
  })();
  
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>