Javascript regex function wont initiate -


I need to do some verification using regular expressions in javascript.

8 of my 10 regexs work like a magic except this one, I have tried many changes in my regex and code, firebug, dreamware, participated in many browsers, code Will not be cautious, the problem is in the function and I can not point to my fixer on it.

Here is a test version of my code:

Function valid DO_B () {var regexDOB = / ^ (jan | feb | mar | apr | may | jun | Jul | august | september | october | november | DEC) ([0-9]) {4} $ / i; Var check dob = "jan1888"; // document.form.DateofBirth.value; If (regexDOB.test (checkDOB) == incorrect) {Warning ("Date of birth should be in the following format: jan1990 (example)"); //document.form.DateofBirth.focus (); return false; } And if (2014 - eval (checkDOB.substr (3,4)) 19) Alert ("You must be at least 19 years old"); //document.form.DateofBirth.focus (); return false; } And {warnings ("true"); Back true; }} // validate DOB validate_DOB ();

Any help is greatly appreciated, thanks.


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -