• 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

New Here ,
Feb 10, 2021 Feb 10, 2021

Copy link to clipboard

Copied

In inDesign my text contains some image.png (icons in board game cards) I want every number to be bold before the image.png.

Its something like this:
"Yo can deal +2/damage.png/ if you...."

"Yo pay 9/coin.png/ if you...."
"deal 10 cards"

the 10 in the last line dont have any image so it should be normal.

My code now looks like this: 
\+|\-\d+|\d+

but this makes the 10 bold in this line:
"deal 10 cards"

TOPICS
How to

Views

173

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 , Feb 11, 2021 Feb 11, 2021

This kind of search will find numbers anywhere in the line, not within a certain position. A similar search (using a utility from @Peter Kahrel called GREP Editor lets me see this in realtime).

Screen Shot 2021-02-11 at 21.44.43.png

Instead, I'd use a Nested style that applies no style until it sees a number, then applies a bold until it sees a letter.

 

Screen Shot 2021-02-11 at 21.50.15.png

 You can still use your GREP style to look for plusses and minuses.

Votes

Translate

Translate
Community Expert ,
Feb 11, 2021 Feb 11, 2021

Copy link to clipboard

Copied

LATEST

This kind of search will find numbers anywhere in the line, not within a certain position. A similar search (using a utility from @Peter Kahrel called GREP Editor lets me see this in realtime).

Screen Shot 2021-02-11 at 21.44.43.png

Instead, I'd use a Nested style that applies no style until it sees a number, then applies a bold until it sees a letter.

 

Screen Shot 2021-02-11 at 21.50.15.png

 You can still use your GREP style to look for plusses and minuses.

If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!

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