use strict;
my $str = '.inpt-line {
position: relative;
display: block;
min-height: 56px;
width: 660px;
box-sizing: border-box;
padding: 20px 20px 5px 20px;
color: #787373;
}
.inpt-line label {
font-size: 22px;
font-weight: bold;
text-align: right;
width: 250px;
height: 50px;
}
.inpt-line input,
.inpt-line select {
position: relative;
top: -3px;
height: 30px;
width: 235px;
font-size: 18px;
padding-left: 10px;
box-sizing: border-box;
margin: 0px 15px 5px 10px;
}
input[type="number"] {
width: 80px
}
';
my $regex = qr/^(?=.*px\;)([ \S]*)/mip;
my $subst = '$1';
my $result = $str =~ s/$regex/$subst/rg;
print "The result of the substitution is' $result\n";
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Perl, please visit: http://perldoc.perl.org/perlre.html