in reply to Re: Negating a leading whitespace
in thread Negating a leading whitespace
Unless you can assume that the 2 chars will never be at the beginning of the line, in which case you can just do:if ( $line =~ /^\S/ && $line =~ /XY/ ){ ... }
if ( $line =~ /^\S.*?XY/ ){ ... }
|
|---|