> it's supposed to catch a "yy hh:mm" string, but when I pass 4 digit
> year, it
> still says true. It also optionally allows for 12hr clock values (hence
> the alternation with the am/pm)
>
> var reg:RegExp = /^\b(\d{2})\b[
> ]\b(?:(?:0?[1-9]|1[012])(?:[.:][0-5]\d){1,2}(?:\D?[ap][m]))|(?:[01]*\d|2[0-3])\b[.:]\b[0-5]\d\b$/i;
>
> trace(reg.test("1969 21:00"));
I've always used "\s*" the way you are using "\b". But I think you
always want one whitespace character between year and time? Is that what
the \b[ ] thing is doing? How about replacing "^\b(\d{2})\b[ ]\b" with
"^\s*(\d{2})\s+".
Darren
--
Darren Cook
http://dcook.org/mlsn/ (English-Japanese-German-Chinese free dictionary)
http://dcook.org/work/ (About me and my work)
http://dcook.org/work/charts/ (My flash charting demos)
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org