Fin&replace, not to find other words

Hello!
If we have a sequence:

char
long
character char character
character long character
characterchar character
characterlong character
character charcharacter
character longcharacter

how do we achieve by find&replace just the words “char” and “long” to be captured, but not the word “character” nor any part or letter of it?

Many thaks!

In Find&Replace dialog check “Whole words only” or try find “char” with a space before and after word " char ", of course include word which haven’t leading space.

As @B.Horvat has indicated, there is no single regular expression in LO that will find all required instances. This will find all but the very first instance of “char”:

[^a-z](char|long)[ ]

This will find the first instance only:

^(char|long)[ ]

^(char|long)[ ] does not find any obtion at my pc. What is this expression supposed to do?
Many thanks!

^ == beginning of line, then either “char” or “long”, followed by a single space [ ]