Re: GREP beginning of document / Add text to the start of a file

26 views
Skip to first unread message

Tom Humiston

unread,
Jan 31, 2013, 3:28:01 PM1/31/13
to textwr...@googlegroups.com
I think there's something about that in the user manual. ;)


On Jan 31, 2013, at 2:04 PM, Adam Wright wrote:

> How do you do a GREP search of the beginning of a document?
>
> I'm trying to add some text to the beginning / start of thousands of
> documents. Is there a easy way to GREP the start of a file (ex.
> "(.\start)") and replace with my text (ex. "<!-- Hello this is the start of
> the file -->").
>
> Any suggestions?

Steve

unread,
Jan 31, 2013, 10:18:57 PM1/31/13
to textwr...@googlegroups.com
\A finds the top of the document
\z and \Z finds the bottom of the document, the difference being "the last non-blank-line of the document" versus "the very-very bottom of the document."

-Steve
Reply all
Reply to author
Forward
0 new messages