in reply to
RegEx Beginning of line or whitespace match
/^\s*(for\()/
should work. Use '^' to require that the match occurs at the beginning of a line rather than anywhere within the line.
Comment on
Re: RegEx Beginning of line or whitespace match
Download
Code
In Section
Seekers of Perl Wisdom