Rss Feed
  1. Alphanumeric, dash and underscore but no spaces regular expression check Javascript


    var regexp = /^[a-zA-Z0-9-_]+$/;
    var check = "checkme";
    if (check.search(regexp) == -1)
        { alert('invalid'); }
    else
        { alert('valid'); }


    Only Alphanumeric  regular expression check Javascript


    var regexp = /^[a-zA-Z0-9]+$/;
    var check = "checkme";
    if (check.search(regexp) == -1)
        { alert('invalid'); }
    else
        { alert('valid'); }

  2. 0 comments:

    Post a Comment