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

Grep query

Explorer ,
Jun 21, 2023 Jun 21, 2023

Copy link to clipboard

Copied

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

Views

494

Translate

Translate

Report

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

Votes

Translate

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

Votes

Translate

Translate
Explorer ,
Jun 21, 2023 Jun 21, 2023

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

 

(^/)  The Jedi

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

 

Could you show a real piece of text?

 

(^/)

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

That worked! Thank you so much.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Eugene, just by curiosity, could you explain more?

 

(\^)

Votes

Translate

Translate

Report

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