revised to exclude matching number greater than 80
$player_total_points =~/^[1-7]\d$/ || $player_total_points =~/^80$/

2011/6/21 Dean Du <dea...@gmail.com>

>  $player_total_points =~/^[1-8]\d$/
>
>
> 2011/6/21 eventual <eventualde...@yahoo.com>
>
>> Hi,
>> Looking at the script below, how do I write a range of 10 to 80 as
>> a regular expression.
>> I tried [10 - 80] but it wont work.
>> Thanks
>> ##### script ##############
>>
>> #!/usr/bin/perl
>>
>> my $player_total_points = 70;
>> if ( $player_total_points =~/^(10..80)$/ ){
>>     print "yes";
>> }else{
>>     print "no";
>> }
>
>
>

Reply via email to