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

I've always had a question to ask. I finally have a chance today . Regular selective substitution?

Enthusiast ,
Mar 13, 2022 Mar 13, 2022

Copy link to clipboard

Copied

I want to find "áéíóú" with regular grep and replace it with the corresponding "aeiou".

that is

á=>a

é=>e

í=>i

ó=>o

ú=>u

 

Do I need to do it five times?

I seem to have seen someone who can do it all at once.

Find: [áéíóú]

Replace: I don't know how to write here

Thank you~

TOPICS
Bug , Feature request , How to , Performance , Scripting

Views

221

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

Community Expert , Mar 13, 2022 Mar 13, 2022

I lke Peter Kahrel's script better: https://creativepro.com/files/kahrel/indesign/grep_query_manager.html

It let's you save any query for later use and select from all the saved queries so you don't need to constantl;y rewrite the list.

Votes

Translate

Translate
Community Expert ,
Mar 13, 2022 Mar 13, 2022

Copy link to clipboard

Copied

Find: (á|é|í|ó|ú)

Change: $1

 

$1 represents a variable of the content found within the first parentheses. The pipe character means "or".

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 ,
Mar 13, 2022 Mar 13, 2022

Copy link to clipboard

Copied

Obviously written without sufficient coffee. This would not work. Use find change by list as Joel suggests. 

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 ,
Mar 13, 2022 Mar 13, 2022

Copy link to clipboard

Copied

There's a script that is installed by default with InDesign called "FindChangeByList".  It does exactly what you want; it lets you stack GREP queries, so you can do five at once. 

 

findchangebylist.gif

 

 

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 ,
Mar 13, 2022 Mar 13, 2022

Copy link to clipboard

Copied

I lke Peter Kahrel's script better: https://creativepro.com/files/kahrel/indesign/grep_query_manager.html

It let's you save any query for later use and select from all the saved queries so you don't need to constantl;y rewrite the list.

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 ,
Mar 13, 2022 Mar 13, 2022

Copy link to clipboard

Copied

LATEST

1000x thanks, Peter! That is miles better than FindChangeByList. Also much better than my own folder-full-of-text-files with names like AllChineseGreps2019.txt. 

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