• 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 doesn't apply in Paragraph Style, but GREP search works fine

Community Beginner ,
May 02, 2019 May 02, 2019

Copy link to clipboard

Copied

I'm using the following GREP expression to change character styles between to Parenthesis within Paragraph Style Options:

(?<=\().*?(?=\))

Problem is, when I create a GREP style in the paragraph style, it doesn't change the style. But if I do a GREP search and replace, it works as intended, so the code is not the issue.

Anyone know how to fix this?

(New) Balm when you buy 2 (Old Beauty) products.

to

(New) Balm when you buy 2 (Old Beauty) products.

Views

2.0K

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

Guide , May 02, 2019 May 02, 2019

Piece of cake

Via grep styles, apply "Invisible" character style using [()] regex.

My recipe for "invisibility":

size: 0.1pt

tracking: -1000

vertical and horizontal scaling: 1%

color: [none]

Votes

Translate

Translate
Guide ,
May 02, 2019 May 02, 2019

Copy link to clipboard

Copied

Hi

I would start by checking there's no character style (with "Regular" style) applied to the text.

(Character styles has priority over grep styles.)

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 02, 2019 May 02, 2019

Copy link to clipboard

Copied

I agree with @vinny38 -- I just tested with CC2018 and it works as intended.

Only if you are 100% sure it should have worked (*), then maybe it's related to the CC2019 bug GREP search fails to find all the matching instances in long InDesign documents​. If you are using CC2019 and did not manually install this bug fix, you could try this.

(*) I.e., you are sure you are looking at the right document, have no silly typos in the GREP, you are looking at the correct character style name, et cetera et cetera. No offense meant, but very, very often, such "it does not work!" complaints are due to human error ...

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
Guide ,
May 02, 2019 May 02, 2019

Copy link to clipboard

Copied

Game: Here, there's no char style already applied but the grep style doesn't work! … 

Capture d’écran 2019-05-02 à 14.24.04.png

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
Guide ,
May 02, 2019 May 02, 2019

Copy link to clipboard

Copied

fungame.png

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
Guide ,
May 02, 2019 May 02, 2019

Copy link to clipboard

Copied

Capture d’écran 2019-05-02 à 14.43.29.png

Je n'aurai même pas osé ! … Vincent, t'as vraiment l'esprit tordu! 

Donc le style de caractère est correct ! …

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
Guide ,
May 02, 2019 May 02, 2019

Copy link to clipboard

Copied

T'as pas montré la fenêtre d'options de style de paragraphe en entier...

tordu.png

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
Guide ,
May 02, 2019 May 02, 2019

Copy link to clipboard

Copied

… Le problème ici, c'est le style Grep !  [pas de piège ailleurs !]

Capture d’écran 2019-05-02 à 15.14.01.png

Capture d’écran 2019-05-02 à 15.14.46.png

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
Guide ,
May 02, 2019 May 02, 2019

Copy link to clipboard

Copied

OK man... got it.

(Thanks to your last screenshot where the standalone square bracket caught my eye.)

Obviously there was one (or more) invisible characters at the end of the regex that would make it fail.

The moral of this story: let's be careful when copying/pasting Grep code from a forum

gotit.gif

The notepad answer:

notepad.png

Thanks for this fun game mon ami !

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
Guide ,
May 02, 2019 May 02, 2019

Copy link to clipboard

Copied

À une prochaine fois ! …

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 02, 2019 May 02, 2019

Copy link to clipboard

Copied

LATEST

Hi Vinny,

maybe it would help if one always is using the Advanced Editor option of the forum and do syntax highlighting a GREP pattern with

Insert >> Syntax Highlighting > Plain

(?<=\().*?(?=\))

Regards,
Uwe

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 ,
May 02, 2019 May 02, 2019

Copy link to clipboard

Copied

Yep your both right many thanks, it was a character style.

So for my next trick I'm going to try and delete or change the character style of Parenthesis so they disappear or at least hidden using a white very small point size within the character style. Would this be possible?

As a background of what I am trying to do I am automating artwork to be created from data (excel file) so the Parenthesis are a way to indicate bold type within the spreadsheet which intern will populate on the Artwork.

(New) Balm when you buy 2 (Old Beauty) products.

to

(New) Balm when you buy 2 (Old Beauty) products.

to

New Balm when you buy 2 Old Beauty products.

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
Guide ,
May 02, 2019 May 02, 2019

Copy link to clipboard

Copied

Piece of cake

Via grep styles, apply "Invisible" character style using [()] regex.

My recipe for "invisibility":

size: 0.1pt

tracking: -1000

vertical and horizontal scaling: 1%

color: [none]

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 ,
May 02, 2019 May 02, 2019

Copy link to clipboard

Copied

Absolutely nailed it guys.

Thank-you ( Merci ) very much, really appreciate you time and Knowledge.

Cheers

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