I don't think you can "or" in the middle of a character class.  I think that
if you wanted to use that approach, you should have a separate character
class for each "or".

-----Original Message-----
From: Dave Chappell
To: [EMAIL PROTECTED]
Sent: 5/10/02 7:55 AM
Subject: Matching a range

I read a file line by line, on each line if any numbers in the range
specified below exist between comas, 

Example: 
Line 1> hello,world,123,,
Line 2> The grass,456, is,greener,
Line 3> On,533,the,other, side
Line 4> As, long, as the,10000,grass is watered
Line 5> Bye,world,680,,

print the line to another file. I have tried different variations. In
the
example above and based on my ranges, line 3 & 5 should be printed to
another file. Where am I going wrong?


while (<IN>) {
        if
(/,[512..520|528..568|576..578|592..600|608..622|624..670|672..685|768..
771]
,/){
                print OUT;
        }
}



Regards,

Dave Chappell

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to