Example Of Using Regular Expressions For Syntax Checking In JavaScript

Example Of Using Regular Expressions For Syntax Checking In JavaScript


  • 25 Jan, 2012

    var re = new RegExp(" ^(&[A-Za-z_0-9]{1,}=[A-Za-z_0-9]{1,})*$" ) var text = myWidget.value var OK = re.test(text) if( ! OK ) {alert(" The extra parameters need some work. Should be something like: " &a=1&c=4" " ) }

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.