Skip to main content
Participating Frequently
June 21, 2023
Answered

Grep query

  • June 21, 2023
  • 3 replies
  • 1013 views

Hi all,

 

I am looking for a GREP for:

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

Replace with  character style 'underline'

 

Many thanks.

This topic has been closed for replies.
Correct answer m1b

Hi @OriginationCC27875182tucs, try the following:

 

Find what:

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

 

Change to:

$1

 

Change Format:

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

- Mark

3 replies

Community Expert
June 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.

FRIdNGE
June 21, 2023

Eugene, just by curiosity, could you explain more?

 

(\^)

m1b
Community Expert
m1bCommunity ExpertCorrect answer
Community Expert
June 21, 2023

Hi @OriginationCC27875182tucs, try the following:

 

Find what:

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

 

Change to:

$1

 

Change Format:

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

- Mark

Participating Frequently
June 21, 2023

That worked! Thank you so much.

Participating Frequently
June 21, 2023

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

FRIdNGE
June 21, 2023

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

 

(^/)  The Jedi