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

GREP search and replace

Explorer ,
Jun 27, 2023 Jun 27, 2023

Copy link to clipboard

Copied

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

TOPICS
Scripting

Views

169

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 1 Correct answer

Guide , Jun 27, 2023 Jun 27, 2023

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

Replace by:  $3

 

(^/)  The Jedi

Votes

Translate

Translate
Community Expert ,
Jun 27, 2023 Jun 27, 2023

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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

Replace by:  $3

 

(^/)  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
Explorer ,
Jun 28, 2023 Jun 28, 2023

Copy link to clipboard

Copied

LATEST

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.

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