Insert First Word On Page Into Header

Your first reference is for Calc, not for Writer.
In Writer, regular expressions are limited to Edit>Find & Replace to provide a versatile search functionality.

Yes and the second is in reference to Writer, because both are from the LibreOffice help documentation. Regex is old functionality that is generally built in by default into applications such as Word and other word processors for situations such as these. So unless Libre specifically states otherwise, there’s no reason to believe this basic default functionality doesn’t exist and it’s just a matter or where.

If you’re unsure how to implement and use the functionality, or that it exists in the first place, that’s fine. Because the regex functionality isn’t actually what I’m trying to accomplish, just something I thought may achieve a solution to my problem, which nothing you’re suggested has. It’s likely I’ll have to write a separate little script outside Libre to accomplish what in my mind should be basic functionality.

Here’s some further reading on Regular Expressions (Regex) should you feel inclined - https://en.wikipedia.org/wiki/Regular_expression

I still don’t understand why you’d use regular expressions to highlight a word. Just apply the character style. You do it only once.
Assuming you could have a function to conditionally apply a style, this has to be done every time you load the document, while having applied the character style is “static” and no longer needs to be redone.

Perhaps your goal is to be able to change the highlight at will. Once again, this is what styles are for. Give it a name like FirstWordHighlight. Later, change the settings in the style and it is automatically propagated to all instances styled with FirstWordHighlight. No conditional involved, no regex; just the basic styling behaviour.

The styling model in Writer is quite simple. There are 3 layers:

  • paragraph: style defines the “geometry” and a default look for text
  • character: style defines look of text; overrides the default in a paragraph style
  • direct formatting: no style; can change any setting; overrides both paragraph and character layers