Skip to main content
Known Participant
January 24, 2017
Question

Find And Change Case Sensetive?

  • January 24, 2017
  • 3 replies
  • 2960 views

Example: Find: Ahmet Change: Mehmet Find: AHMET Change: MEHMET Find: AHmEt Change: MEhMt But the script should detect it. 🙂

This topic has been closed for replies.

3 replies

Known Participant
January 24, 2017

thanks but I did not exactly say what I meant.

Known Participant
January 24, 2017

But not working

Vamitul
Legend
January 24, 2017

That is what i said. There is no way to get what you want.
You can find all instances of ahmet, regardless of it's case, but you can only replace them with "mehmet" lower case (or however you typed it in the "Change to" field.

Consider this example:

the before text in indesign is: 

AhMet ahmet aHMet

you are searching for "ahmet" case insensitive. "Ahmet" has 5 characters, and it will be found in the source text 3 times.

you try to replace "ahmet" with "Mahmud", which has 6 characters. Which of the letters form each match should be capitalised?

Vamitul
Legend
January 24, 2017

To ignore case when using find grep you can specify the (?i) flag. Unfortunately, the change will not respect the original case. Eg:

find: (?i)ahmet

will match Ahmet, ahmet, AhMeT etc.

but
find: (?i)ahmet
change: mehmet

will change everything to lowercase.

tpk1982
Legend
January 24, 2017

Case sensitive available only in Text search, unfortunately GREP search not allowing this

    app.findChangeTextOptions.caseSensitive = true;