Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


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, Server developers

Views

84

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
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , 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 tourni...

Likes

Translate

Translate
Adobe Community Professional ,
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 )

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
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

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
community guidelines
Engaged ,
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
Mars Premedia

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
community guidelines