Find & replace start with

Discuss the word processor
Post Reply
ToniVF
Posts: 3
Joined: Mon Oct 29, 2018 11:31 pm

Find & replace start with

Post by ToniVF »

Hi everybody,

I want to find all words starting with com like computer, comedy, complete in a text. I try using com+ in the text box. It works, but it only marks the com in that words.

So if i want to underline the entire word I have to manually select them one by one and underline them.

Is it possible to use some other regular expression that marks all the word and not only the start.

Thanks.
OpenOffice 4.1.5 on Windows 7
FJCC
Moderator
Posts: 9274
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Find & replace start with

Post by FJCC »

Here is one version

Code: Select all

\bcom\w*\b
That looks for a word boundary, com, zero or more word characters, and a word boundary.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Find & replace start with

Post by John_Ha »

See [Tutorial] How to record a macro (and Regular Expressions) for information on regular expressions.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Post Reply