Results 1 to 2 of 2

Thread: Need help in using reg exp in JS function <URGENT>

  1. #1
    Join Date
    Sep 2011
    Posts
    1

    Need help in using reg exp in JS function <URGENT>

    I need to validate a field in a form (isNumber in the following example) with all numbers and characters from a-z (both in upper and lowercase)
    I am trying to use the following regular expression in my JS function :-

    flag0=0;
    var regExp= /[A-Za-z0-9]*/;
    if(!(regExp.test(isNumber)))
    {
    alert("invalid number");
    flag0=1;
    }

    but this is not working
    Please help

  2. #2
    Join Date
    May 2009
    Posts
    637

    Re: Need help in using reg exp in JS function <URGENT>

    There is an JavaScript RegExp Regular Expression Tester available online. In this you can use multiple JavaScript to test and get the right code. Do not forget to check that Javascript is enabled on your browser. Or else this will not work. This tester supports many regular expression which supports many regex. A very clean and easy to use tell. Just try this out.

Similar Threads

  1. c++ equivalent function to the c-function 'sprintf
    By Dilbert in forum Software Development
    Replies: 6
    Last Post: 13-12-2011, 04:03 PM
  2. c# function equivalent to gettime function in javascript
    By Omaar in forum Software Development
    Replies: 4
    Last Post: 10-03-2010, 10:44 PM
  3. Replies: 5
    Last Post: 27-02-2010, 07:52 PM
  4. How does abstract function differs from virtual function?
    By Maddox G in forum Software Development
    Replies: 5
    Last Post: 29-01-2010, 11:32 AM
  5. Function keys don't function under windows XP
    By GunFighter in forum Hardware Peripherals
    Replies: 3
    Last Post: 08-04-2009, 11:07 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,717,688.82704 seconds with 17 queries