in reply to RegEx Beginning of line or whitespace match
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\(/) { # ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: RegEx Beginning of line or whitespace match
by THRAK (Monk) on Feb 11, 2005 at 21:46 UTC | |
by CountZero (Bishop) on Feb 11, 2005 at 22:50 UTC |