Inform user from regex test via console.log - Javascript RegExp

Javascript examples for RegExp:RegExp test

Description

Inform user from regex test via console.log

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=( function() {//from  ww  w  .j  ava 2s  . c o  m

function validate_form() {
   return (/^[a-fA-F0-9]+$/.test("g")) ? "":console.log("There is a problem with your input");
}

 validate_form();


    });

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials