if ($line =~ /(\s+|^)(for\()/gi) { print 'match'; } [download]
In reply to Re: RegEx Beginning of line or whitespace match by Frantz in thread RegEx Beginning of line or whitespace match by THRAK