in reply to Regex condition

I don't know what the problem is since you don't give us enough information to go on, such as, what are "the lines" you are matching against? However, two things about your code occur to me.

When you are matching against something in $_, you don't have to say $_ =~ /.../ but can just use /.../ as the match will be against $_ by default.

You don't have to put square brackets around the \d as it is already a character class denoting digits.

Cheers,

JohnGG