Your if statement appears to match the beginning of a line followed by none white space (^\S). Did you mean ^\s* ? or the more accurate \A\s*\Z.
Neil Watson
watson-wilson.ca
In reply to Re: Replace first blank line in a text file with headers.
by neilwatson
in thread Replace first blank line in a text file with headers.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |