Match beginning and end of file in Notepad++
beginning: \A
end: \Z
Regular expression option must be checked.
So, for example, if you want to match from the beginning of the file, to a certain point further down the file, you could try (having checked . matches newlines):
\A(.*?)<td>
This will match up to the first instance of <td> (non-greedy match)