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

GREP Style to remove a character symbol

Community Beginner ,
Jun 06, 2017 Jun 06, 2017

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

15.7K
Translate
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

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

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.

Translate
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

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.

Translate
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

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

Translate
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

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!

Translate
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

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

Translate
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 01, 2025 May 01, 2025

This was so incedibly helpful! Thank you!

Translate
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
Explorer ,
May 02, 2025 May 02, 2025
LATEST

You can even simplyfy this and using just one grep and characterstyle: Just apply no color and 1% horizontal scaling on the character you want to hide. This 1% makes the char nearly invisible.

Translate
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

Hi,

Use Find/change?

Find=~

Change=(nothing)

-Aman

Translate
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

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.

Translate
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

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

Translate
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