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

How to remove non-printing character or ignore it while GREP search

Engaged ,
Nov 25, 2021 Nov 25, 2021

Copy link to clipboard

Copied

Hi All,

 

Can you any one let me know how to find and remove non-printing character, those are converted from xml tag text to text object?

Currently I am using below code but unable to remove.

app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "~I";
footenote.texts[0].changeGrep();
app.findGrepPreferences = app.changeGrepPreferences = null;

SumitKumar_0-1637851905092.png

Regards,

 

 

-Sumit
TOPICS
Scripting , SDK

Views

853

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 , Nov 25, 2021 Nov 25, 2021

Hi Sumit,

"~I" will only find index markers.

 

What you are looking for are FEFF special characters in general.

They can be found with:

app.findTextPreferences.findWhat = "<FEFF>";

They cannot be found with GREP.

 

If one instance is found you have to decide if you want to remove it.

This is quiet difficult, because FEFF is not only used for index markers or your converted tags, but also for hyperlink anchor markers and Note objects etc.pp.

 

See:

 

Delete unicode character 0xFEFF
laurent tournie

...

Votes

Translate

Translate
Community Expert ,
Nov 25, 2021 Nov 25, 2021

Copy link to clipboard

Copied

Hi Sumit,

"~I" will only find index markers.

 

What you are looking for are FEFF special characters in general.

They can be found with:

app.findTextPreferences.findWhat = "<FEFF>";

They cannot be found with GREP.

 

If one instance is found you have to decide if you want to remove it.

This is quiet difficult, because FEFF is not only used for index markers or your converted tags, but also for hyperlink anchor markers and Note objects etc.pp.

 

See:

 

Delete unicode character 0xFEFF
laurent tourniel7664515, Nov 24, 2021
https://community.adobe.com/t5/indesign-discussions/delete-unicode-character-0xfeff/td-p/12547311

Especially my answer here:
https://community.adobe.com/t5/indesign-discussions/delete-unicode-character-0xfeff/m-p/12547528#M45...

 

Regards,
Uwe Laubender

( ACP )

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
Engaged ,
Nov 25, 2021 Nov 25, 2021

Copy link to clipboard

Copied

Hi Laubender,

 

Thank you so much!!! This is as per my expectation.

 

 

Regards,

-Sumit

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
Enthusiast ,
Dec 03, 2021 Dec 03, 2021

Copy link to clipboard

Copied

LATEST

This script does it, and more. Free download. Enable "remove zero-width characters".

https://www.marspremedia.com/software/indesign/text-cleanup

William Campbell

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