"Search and Find" is there any way to exclude it from searching in the header and/ footer?

in Writer using regular expression eg ([:alnum:])([:space:])([:space:]) the search enters into headers and footers which I want to exclude from the main document search or is there a way to lock / write protect the header and footer?

Select all content first, by pressing ctrl+A.

Selecting a range like this enables the checkbox Selection only just above the one for Regular expressions in the Find/Replace dialog. Tick Selection only, and start your search operation.

Headers/footers are parts of layout, not content, so selecting content and ticking selection only should exclude those from your search.

Thanks keme, Yes that is the next best solution I did try that already but since I wrote an AHK script to run through repeated searches and replacing it is difficult to reliably toggle on the “current selection only”. It would be easier if there were some way to just “permanently” lockout the headers and footers. but thanks.