Toby Stuart [TS], on Wednesday, June 8, 2005 at 16:47 (+1000 ) made these points:
TS> Before: $s = "abc@123"; TS> After : $s should only contain: "abc@123" TS> I've tried a few things with ranges etc. but can't get it. Obviously I TS> could check if the number is <= 29 and then replace but would prefer a TS> single regex if possible. maybe you are looking for: my $xml = "abc@123"; $xml =~ s/&\#(\d+)(??{ $1 <= 29 ? "" : "(?!)" });//g; print $xml; hope helps. -- How do you protect mail on web? I use http://www.2pu.net ["Bother," said Pooh, as the hippopotamus' breath knocked him out cold] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>