title: Javascript hexadecimal number validation using regular expression
body: <p>My function should return true if the hexa number is valid using regular expressions
  note: hexadecimal numbers may contain a point(.) for decimals (example: 2E6.A3)</p>
  
  <p>Hexadecimal:    0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F</p>
  
  <p>I gave examples on my main()</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function returnHexaNumber(string) {
      var regExp = /^[-+]?[0-9A-Fa-f]+\.[0-9A-Fa-f]?$/
      return (isAString(string) &amp;&amp; regExp.test(string))
  }
  function main() {
      alert("true : " + returnHexaNumber('2E6'))
      alert("true : " + returnHexaNumber('2E6.A3'))
      alert("false : " + returnHexaNumber('ZZZ'))
      alert("false : " + returnHexaNumber(''))
      alert("false : " + returnHexaNumber(0))
      alert("false : " + returnHexaNumber('10'))
  }</code></pre>
  </div>
  </div>
  </p>