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.


InDesign GREP find digits in last word of paragraph

New Here ,
Mar 11, 2021 Mar 11, 2021

Copy link to clipboard

Copied

I'm struggling to figure out this GREP code. I created a paragraph style to highlight numbers in the last word of a paragraph.

 

An example data set would be:

Baltimore 3

Jacksonville 5*

Portland 9+

Sunny7 3+

 

I want to only highlight the numbers, but only if they're at the end of the paragraph, and I don't want to select the pluses or asterisks.

TOPICS
How to

Views

81

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 , Mar 11, 2021 Mar 11, 2021
Without further informations (maybe) I would do something like this: \d+(?=[*+]$)|\d+$

Likes

Translate

Translate
Adobe Community Professional ,
Mar 11, 2021 Mar 11, 2021

Copy link to clipboard

Copied

Without further informations (maybe) I would do something like this:

\d+(?=[*+]$)|\d+$

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
New Here ,
Mar 11, 2021 Mar 11, 2021

Copy link to clipboard

Copied

LATEST

Works like a charm! Thanks so much.

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