Skip to main content
Participating Frequently
June 27, 2023
Answered

GREP search and replace

  • June 27, 2023
  • 3 replies
  • 448 views

Hi,

 

I am wanting to do a GREP search and replace for: emspace, emspace, a letter, emspace, emspace

 

and replace it with the found letter.

 

Also some will be <?tpfmt=3>emspace, emspace, a letter, emspace, emspace<?tpb=12pt>

I am sure this is simple but I am still learning the basics.

 

Many thanks

Emma

This topic has been closed for replies.
Correct answer FRIdNGE

Find:  (<.+?>)?(~m{2})(\w)\2(?1)?

Replace by:  $3

 

(^/)  The Jedi

3 replies

Participating Frequently
June 28, 2023

Thank you for your replies. I had manually stripped out the code before your replies. These codes you provided I will save so that I can adapt them when needed and will be extremely useful.

FRIdNGE
FRIdNGECorrect answer
June 27, 2023

Find:  (<.+?>)?(~m{2})(\w)\2(?1)?

Replace by:  $3

 

(^/)  The Jedi

pixxxelschubser
Community Expert
Community Expert
June 27, 2023

Should the spaces really be eliminated completely? Or do you actually want to replace by [space] [found letter] [space]?