Javascript examples for RegExp:RegExp test
Inform user from regex test via console.log
<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>