HandyFile Find And Replace Online Help Submit feedback on this topic   

KB0002: How to find the very beginning of the file

Question

I cannot seem to figure out how to find the very beginning of the file. Your example on the web page says:

^(.)

But when I search for that, I get no results. What am I missing? I am searching text files with .txt extension. I want to add a double quote at the beginning of the file.

Answer

I suppose that you simply forgot to turn on the regular expressions! Check the box and try again. We double-checked the pattern, it works.

For example:

File type:*.txt
Find:^(.)
Replace:begin\r\n\1
Regular expressions: checked

So we got the word begin followed by the line-break in each file. Or, in your case:

Replace:\"\1

Note the escape slash before the double-quote symbol. When the RegExp's are on, non-alphabetical symbols should be escaped.