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

GREP Style to remove a character symbol

Community Beginner ,
Jun 06, 2017 Jun 06, 2017

Copy link to clipboard

Copied

How would I remove a character symbol within a set of words?  The example below has "~" that needs to be removed from the description.

Huggable Suit Hangers~ Black Pkg/10

Thanks in advance

Views

15.1K

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 Employee , Jun 06, 2017 Jun 06, 2017

Hi,

Use Find/change?

Find=~

Change=(nothing)

-Aman

Votes

Translate

Translate
Community Expert ,
Jun 06, 2017 Jun 06, 2017

Copy link to clipboard

Copied

A GREP style can be used to assign formatting to a pattern, but not to remove anything.

Do you need to simply remove every ~ from the document? You can do that with a Text find/change. (Leave Change to blank.)

InDesign CCss_007.png

Or is there a pattern involved to isolate just specific ~'s? In that case, a GREP find/change might be the answer. We'll need more information about how/where the ~'s appear to help you with that.

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 Beginner ,
Jun 06, 2017 Jun 06, 2017

Copy link to clipboard

Copied

I should've added some additional detail.  I typically use find/change as you detailed above, but I thought there could be a way to have it be automatically removed through a GREP style/expression somehow.  There are other character symbols that can be in descriptions that I copy from a spreadsheet so I'm doing several clicks through the find/change to remove them all.

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 ,
Jun 06, 2017 Jun 06, 2017

Copy link to clipboard

Copied

In that situation, a regular text find/change is what you want, as Aman and I both described above.

But, did you know you can save your queries (top row of my screen shot) to make this quicker--then just select them from the list In the future? And you can buy a plug-in that can string them together for you to save even more time!

http://www.automatication.com/index.php?id=24

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 Beginner ,
Jun 06, 2017 Jun 06, 2017

Copy link to clipboard

Copied

I didn't know that the queries could be saved.  That's fantastic.  I'll be sure to check out the plug-in, too.  Thanks for the tips!

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
Advocate ,
Jun 07, 2017 Jun 07, 2017

Copy link to clipboard

Copied

Heyya.

If you dont want to alter your source-text, you can also "hide" these characters, by GREP:
Bildschirmfoto 2017-06-07 um 12.33.13.png

Bildschirmfoto 2017-06-07 um 12.33.05.png

Bildschirmfoto 2017-06-07 um 12.32.54.png

Bildschirmfoto 2017-06-07 um 12.32.15.png

As you see, the paragraph above is generic with 3 tildes, the second has a paragraphstyle, which finds the tilde by GREP and uses the character-style HIDE (which has just textcolor set to none/none) and HIDE2 (which does use "Unterschneidung" -500-ish to pull the space together).

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
Adobe Employee ,
Jun 06, 2017 Jun 06, 2017

Copy link to clipboard

Copied

Hi,

Use Find/change?

Find=~

Change=(nothing)

-Aman

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 Beginner ,
Jun 06, 2017 Jun 06, 2017

Copy link to clipboard

Copied

Thanks!  I've been doing find change, but thought there was something that I could do to eliminate the extra clicks since I have other character symbols that need to be removed as well.

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
New Here ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

LATEST

Hi,

This can be accomplished by setting up a Character style that reduces the point size of the text to 0.1 and changes the color to the same color of the background.

The character style setup I used is below:

Then I applied this to my paragraph style as a GREP style to remove all brackets when close together with a space after them in text. E.g. "Text text text () text text text (text)"

It would remove the "() " and leave the text as below:

"Text text text text text text (text)"

The grep setup was as follows:

And the example in the actual text with no style attached:

With the style attached:

Below is the GREP i used for your example using the same Character style detailed above:

The reason for the extra \ is to remove the space after this character if one exists.

So a GREP to remove both "~ " with a space and to remove "~" without a space after would be:

Hope this helps.

Thanks

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