LibreOffice is a highly complex software with lots of features, tools, functions (in case of Calc mainly), a user interface (UI) depending on settings and on the used OS/GUI, an ApplicationProgrammingInterface (API), a small programming language (LibteOffice Basic) including an IDE, and means to build bridges to other programming languages.
You shouldn’t expect to find explicit documentation concerning any very special case you may have currently in mind - on the first page hopefully.
- There is the help system where you easily find information (e.g.) about the standard functions of Calc
- There are guides like those found here which contain a lot of long-term valid information, but also are updated occasionally.
- There are very-long-term stable specifications to ensure very-long-term usability of once created documents - even using third-party software programmed for the purpose.
If you want to become an expert you may need to read/study/use some of these materials.
As an occasional user you probably want to set some limitations to your studies, and to rely on some creativity, some targetted researech - and occasionally some help that you can get out of a community of users like by this Q&A site where many more experienced users help less experienced ones to close up.
Especially for your concern I didn’t write a tutorial, but made an example document attached below.
Concerning frequent qualified usage of RegEx you will need some specialized studies for which you find very valuable information here and here (ICU is the “flavor” used by LibO).
disask103019specialIfUsage.ods (14.0 KB)
In the end you will give something back helping others here to solve their problems. There are no “pure customers” where a community shall live.