Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Is it possible to look for 2 diffrent colors?

Participant ,
Jul 27, 2023 Jul 27, 2023

Hi

Is it possible to find and change using 2 colors?

I want to find XX in black followed by YY in red and change XX to red.

TOPICS
How to , Type
678
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Jul 28, 2023 Jul 28, 2023

[Tested]

 

It works fine but 2 colors, so 2 runs:

 

1/ Search "black" and replace by "green" [6]

2/ Search "green" and replace by "brown" [3]

 

(^/)

Translate
Community Expert ,
Jul 27, 2023 Jul 27, 2023

Please post a screenshot of your use case so you can get a detailed answer because there might be several solutions depending on your specific question.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 27, 2023 Jul 27, 2023

Untitled-1.jpgI want those black circled words to be in green in this example because they come after a green text.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jul 27, 2023 Jul 27, 2023

You mean: one word in black between texts in green!

 

(^/)  The Jedi

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 27, 2023 Jul 27, 2023

It can be easily scripted - can you share sample document ?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jul 27, 2023 Jul 27, 2023

Just a Grep F/R:

 

Find: (?<![^^])\h?\H+\h?(?![^$]) + black

Replace: green

 

(^/)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 27, 2023 Jul 27, 2023
 
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jul 28, 2023 Jul 28, 2023

[Tested]

 

It works fine but 2 colors, so 2 runs:

 

1/ Search "black" and replace by "green" [6]

2/ Search "green" and replace by "brown" [3]

 

(^/)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 28, 2023 Jul 28, 2023
LATEST

It worked indeed.

Can you explain this GREP code? 

Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines