This matches if the "for(" has no characters at all before it (== at beginning of line) or if there are whitespace characters. You were missing the anchor, I think.
In reply to Re: RegEx Beginning of line or whitespace match
by gaal
in thread RegEx Beginning of line or whitespace match
by THRAK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |