in reply to Re: Re: checking dates in strings
in thread checking dates in strings

can you just give me a small hint as how to check if say $1 is in the set 10-19 ?

Thanks to the outer set of parenthesis, $1 is the complete string matched. It gets substituted for itself if isDate($2,$3,$4) return 0. You can check numbers individually inside of isDate(), where they're available in $d, $m, and $y respectively.

Replies are listed 'Best First'.
Re: Re: Re: Re: checking dates in strings
by Anonymous Monk on Nov 11, 2002 at 01:06 UTC
    i am just trying to do this small problem right now
    $brian = 17; if($brian =~ /^1[0-9]$/){ print "$brian is between 10 and 19"; }
    i cannot figure out why this doesn't work. can someone please help?