It will also match "(for(" and ";for(" which is a very common requirement for parsing programming languages. Speaking of which, if you are trying to parse perl or parts of it, check out PPI.if($line =~ /\bfor\(/) { # ... }
In reply to Re: RegEx Beginning of line or whitespace match
by saintmike
in thread RegEx Beginning of line or whitespace match
by THRAK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |