Skip to main content
dublove
Legend
March 13, 2022
Answered

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

  • March 13, 2022
  • 2 replies
  • 483 views

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~

This topic has been closed for replies.
Correct answer Peter Spier

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.

2 replies

Joel Cherney
Community Expert
Community Expert
March 13, 2022

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. 

 

 

 

Peter Spier
Community Expert
Peter SpierCommunity ExpertCorrect answer
Community Expert
March 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.

Joel Cherney
Community Expert
Community Expert
March 13, 2022

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. 

brian_p_dts
Community Expert
Community Expert
March 13, 2022

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

Change: $1

 

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

brian_p_dts
Community Expert
Community Expert
March 13, 2022

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