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.
Without further informations (maybe) I would do something like this:
\d+(?=[*+]$)|\d+$
Copy link to clipboard
Copied
Without further informations (maybe) I would do something like this:
\d+(?=[*+]$)|\d+$
Copy link to clipboard
Copied
Works like a charm! Thanks so much.
Copy link to clipboard
Copied
Hi pixxxelschubser This GREP code is very helpfull. I want to add a single space before the number (any number of digits) at the end of paragraph. What could be the code for this? I give an example (PO Number123 > PO Number 123) or (PO Number3 > PO Number 3) Thanks in advance
Copy link to clipboard
Copied
You can try this:
In Find what: [[:alpha:]]+\K\d+
In change to: \s$0
Copy link to clipboard
Copied
This works fine! Exactly what i needed. Thank a lot!
Copy link to clipboard
Copied
@Krdms Please start a new topic for new questions. But anyway, to add a space before paragraph-final numbers, do this:
Find what: (?=\d+$)
Change to: <a space character>
P.
Copy link to clipboard
Copied
@Peter Kahrel Nice and simple. Thanks
Copy link to clipboard
Copied
This is also very helpfull. I will do it the next time. Thanks!