reg exp synatx prob
Posted: Wed Jun 30, 2004 9:48 am
hey to all,
can someone pls help me with this,
i am modifying a script that was generated with the Yaromat checkform plugin for dreamweaver.
the synatx i would like is values <= to format 99:59:59:24
this is the relevant snippet from the onsubmit action on the form, which i have already modified but only works in some instances
can u please explain the 0 | 1 | 0? in this syntax (0[0-9]|1[0-9]|0?[0-9]\)
i assumed it meant the MSB of the number (0) then the LSB of the number (1) or if only the MSB (0?) also tried swapping these vals but i cant figure out the synatx here
this is a snippet of the function that matches the regexp
kind regards,
g00fy
can someone pls help me with this,
i am modifying a script that was generated with the Yaromat checkform plugin for dreamweaver.
the synatx i would like is values <= to format 99:59:59:24
this is the relevant snippet from the onsubmit action on the form, which i have already modified but only works in some instances
can u please explain the 0 | 1 | 0? in this syntax (0[0-9]|1[0-9]|0?[0-9]\)
i assumed it meant the MSB of the number (0) then the LSB of the number (1) or if only the MSB (0?) also tried swapping these vals but i cant figure out the synatx here
Code: Select all
'time_code','^\(0ї0-9]|1ї0-9]|0?ї0-9]\)\:\(0ї0-5]|1ї0-9]|0?ї0-9]\)\:\(0ї0-5]|1ї0-9]|0?ї0-9]\)\:\(0ї0-2]|1ї0-4]|0?ї0-9]\)\$','4','Field ''time_code'' is not valid.'Code: Select all
function YY_checkform() {
var args = YY_checkform.arguments; var myDot=true; var myV=''; var myErr='';var addErr=false;var myReq;
var myObj = MM_findObj(argsїi].replace(/\ї\d+\]/ig,""));
myV=myObj.value;
if ((myV.length>0)&&(argsїi+2]==4)){ // time
var myMa=argsїi+1].split("#"); var myAt=myV.match(myMaї0]);if(!myAt){addErr=true}
}
}kind regards,
g00fy