on Fri, 10 May 2002 14:55:08 GMT, [EMAIL PROTECTED] (Dave Chappell) wrote:
> (/,[512..520|528..568|576..578|592..600|608..622|624..670|672..685| > 768..771] ,/){ The range operator doesn't work as you want in a regex character class, and neither does the '|'. I would do it like this: #! perl -w use strict; my %is_valid = map { $_ => 1 } (512..520, 528..568, 576..578, 592..600, 608..622, 624..670, 672..685, 768..771); while (<DATA>) { print if /,(\d+),/ && $is_valid{$1}; } __DATA__ hello,world,123,, The grass,456, is,greener, On,533,the,other, side As, long, as the,10000,grass is watered Bye,world,680,, -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]