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

Grep query

Explorer ,
Jun 21, 2023 Jun 21, 2023

Hi all,

 

I am looking for a GREP for:

Search for: <?tul=1> and anything upto <?tul>

Replace with  character style 'underline'

 

Many thanks.

TOPICS
How to , Scripting
1.1K
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 2 Correct answers

Guide , Jun 21, 2023 Jun 21, 2023

(<\?tul=1>)(.+)(<\?tul>|$)

 

(^/)  The Jedi

Translate
Community Expert , Jun 21, 2023 Jun 21, 2023

Hi @OriginationCC27875182tucs, try the following:

 

Find what:

<\?tul=1>([^<]+)<\?tul>

 

Change to:

$1

 

Change Format:

Screenshot 2023-06-21 at 18.36.35.png

I think that will work even if there are carriage returns in between. See how it goes.

- Mark

Translate
Explorer ,
Jun 21, 2023 Jun 21, 2023

Some lines don't have <?tul> so would need to apply until a paragraph return?

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 ,
Jun 21, 2023 Jun 21, 2023

(<\?tul=1>)(.+)(<\?tul>|$)

 

(^/)  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
Guide ,
Jun 21, 2023 Jun 21, 2023
LATEST

"Some lines don't have <?tul> so would need to apply until a paragraph return?"

 

Could you show a real piece of 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
Community Expert ,
Jun 21, 2023 Jun 21, 2023

Hi @OriginationCC27875182tucs, try the following:

 

Find what:

<\?tul=1>([^<]+)<\?tul>

 

Change to:

$1

 

Change Format:

Screenshot 2023-06-21 at 18.36.35.png

I think that will work even if there are carriage returns in between. See how it goes.

- Mark

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
Explorer ,
Jun 21, 2023 Jun 21, 2023

That worked! Thank you so much.

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
Community Expert ,
Jun 21, 2023 Jun 21, 2023

A Nested style would work better and less confusing.

You can type in the characters in the place it says Words - replace it for the text you want.

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 ,
Jun 21, 2023 Jun 21, 2023

Eugene, just by curiosity, could you explain more?

 

(\^)

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