Highlighted

findchangebylist : Problem with wholeWord and caseSensitive options

Community Beginner ,
May 29, 2020

Copy link to clipboard

Copied

Hi,

 

I'm working on Mac InDesign 2020 15.0.1.

I'm trying to work with findchangebylist script. It work fine for finding and changing some text but some options are ignored. Here is an example of one line in the .txt file :

 

grep {findWhat:"ab initio"} {changeTo:"$0",appliedCharacterStyle:"surlignage"} {caseSensitive:false, includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:true} surligner index.

 

It seems like "wholeWord" and "caseSensitive" are not working. Do you have any idea?

 

Thanks!

Patricia, use this in your find query

(?i)\bab initio\b

TOPICS
Scripting

Views

301

Likes

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

findchangebylist : Problem with wholeWord and caseSensitive options

Community Beginner ,
May 29, 2020

Copy link to clipboard

Copied

Hi,

 

I'm working on Mac InDesign 2020 15.0.1.

I'm trying to work with findchangebylist script. It work fine for finding and changing some text but some options are ignored. Here is an example of one line in the .txt file :

 

grep {findWhat:"ab initio"} {changeTo:"$0",appliedCharacterStyle:"surlignage"} {caseSensitive:false, includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:true} surligner index.

 

It seems like "wholeWord" and "caseSensitive" are not working. Do you have any idea?

 

Thanks!

Patricia, use this in your find query

(?i)\bab initio\b

TOPICS
Scripting

Views

302

Likes

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
May 29, 2020 0
Adobe Community Professional ,
May 29, 2020

Copy link to clipboard

Copied

Casesensitive and wholeword are not the options available for grep search. See the Find/Change UI as well you won't have it. You can always add these two options in your grep string using the following

\b for word boundary

\i for case insensitive

 

-Manan

Likes

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
Reply
Loading...
May 29, 2020 1
Advocate ,
May 29, 2020

Copy link to clipboard

Copied

Patricia, use this in your find query

(?i)\bab initio\b

Likes

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
Reply
Loading...
May 29, 2020 1
Community Beginner ,
May 29, 2020

Copy link to clipboard

Copied

Hi Jean-Claude,

 

It didn't work at first, but I figured out that the string should include 2 backslashes before "b". 

 

The string "(?i)\\bab initio\\b" is working just fine.

 

Thank you very much for your help!

Likes

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
Reply
Loading...
May 29, 2020 0