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

Replace grep replace text partially placed out of endnote's tag

Contributor ,
May 13, 2021 May 13, 2021

Copy link to clipboard

Copied

Hi,

I have trying to replace the quote to replace text. In endnote section, the replace text placed out of tag. Kindly guide to place the replace text within the tag. Becuse, If I need to replace again text to quote, wrongly introduced text replaced as below.

 

app.findGrepPreferences.findWhat = "([~}~]])"; 

var myFoundItems =app.documents.item(0).findGrep();

for(var f=0; f<myFoundItems.length; f++){ myFoundItems[f].contents = "[Q1C]" }

 

 

Step 1 

Screenshot 2021-05-13 at 6.59.57 PM.png

Step 2

Screenshot 2021-05-13 at 7.00.50 PM.png

Step 3

Screenshot 2021-05-13 at 7.05.04 PM.png

Step 4

 

Screenshot 2021-05-13 at 7.04.46 PM.png

 

The sample document also place with this post.

 

 

Thanks,

Selva

TOPICS
Scripting

Views

275

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
Contributor ,
May 13, 2021 May 13, 2021

Copy link to clipboard

Copied

Tried too:

app.findGrepPreferences.findWhat = "([~}~]])";

app.changeGrepPreferences.changeTo="[Q1C]";

var myFoundItems =app.documents.item(0).changeGrep();

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
Contributor ,
May 15, 2021 May 15, 2021

Copy link to clipboard

Copied

Hi All,

Have the chance to fix it?

 

 

 

 

Thanks,

Selva

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
Contributor ,
May 17, 2021 May 17, 2021

Copy link to clipboard

Copied

Hi All,

So, I consider to can't avoid this is in endnote section. 

 

 

 

 

Thanks,

Selva

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
Contributor ,
May 17, 2021 May 17, 2021

Copy link to clipboard

Copied

Not attained the solution yet.

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 ,
May 17, 2021 May 17, 2021

Copy link to clipboard

Copied

Why not MATCH to the quote mark as a Positive Lookahead so that the Found would be inside the quote?

Mike Witherell

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
Contributor ,
May 17, 2021 May 17, 2021

Copy link to clipboard

Copied

LATEST

Hi Mike,

I can try this.

 

Thanks,

Selva

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