Find Replace with formatting

More
4 years 10 months ago #25 by Chris
I'm using Word 2007.

I have a regex to find phrases formatted with bold and color red. My find string is:

(.+)

It only finds when the text is on a line by itself. It doesn't find if the text inside and part of other text. Example:

Finds this line

It doesn't find this one inside of this sentence.

Please Log in or Create an account to join the conversation.

More
4 years 10 months ago #27 by stanislav
Hello Chris,

This is correct. Currently, regex searches with formatting conditions work as follows:
- First, all matches of your regular expression are found.
- Then, each match is checked for your formatting condition and only the ones that meet the condition are presented.
If you want to find red text in bold, simply set the type of the search expression to Text (rather than Regular Expression) and leave the Find What field empty. This will find any red+bold text.

Best regards,
Stanislav

Please Log in or Create an account to join the conversation.

More
4 years 10 months ago #28 by Chris
Replied by Chris on topic Find Replace with formatting
Thank you, Stanislav. I want'ed to use regex because the text value differs.

Please Log in or Create an account to join the conversation.

More
4 years 10 months ago #29 by stanislav
Chris,

When you set Type to Text, Find What to empty, and set the formatting conditions, Multiple Find & Replace will find all phrases that are formatted as you specified.

However, if you want to find particular text that is also red+bold, and this text is not a predefined phrase, i.e. you cannot match this text using an Exact matching approach, you can use Microsoft Word wildcards. For this, you need to check "Use wildcards" checkbox. Here is an article that describes the syntax: wordmvp.com/FAQs/General/UsingWildcards.htm .
Also, you can use Insert button to insert the common patterns.

Best regards,
Stanislav

Please Log in or Create an account to join the conversation.

More
4 years 10 months ago - 4 years 10 months ago #30 by Chris
Replied by Chris on topic Find Replace with formatting
Stanislav,

Thanks again. I've seen that page and tried the solutions on it. Still, Word's wildcard feature seems limited. That's what brought me to your product. :)

I wanted the ability to find a formatted, unknown phrase. Then, maybe change various capture results.
Last edit: 4 years 10 months ago by Chris. Reason: Clarify

Please Log in or Create an account to join the conversation.

More
4 years 10 months ago #32 by stanislav
OK, Chris, great! Let me know if I can help you with anything.

Stanislav

Please Log in or Create an account to join the conversation.