Skip to main content
Inspiring
March 10, 2021
Answered

GREP within paragraph-style: all digits except price

  • March 10, 2021
  • 1 reply
  • 788 views

Hi.

 

I want to use only one paragraph-style for a table. In this table there are text and different kind of digits (price, amount, measure, etc.). with the included GREP I only want to grab the simple digits for the number of piecies (top row).

 

The table could look like:

 

quantity | 1 | 10 | 100 | 1.000

price | 1,00 | 2,00 | 3,00 | 4,00

 

 

^(?=\d*\d)((?!,)\d)*$

 

 

That´s how I´ve tried. But It doesn't format the digits behind commas and dots.

 

Any idea?

This topic has been closed for replies.
Correct answer jctremblay

Or simply this if you are talking about tables cells.

^[\d.]+$

 

1 reply

jctremblay
Adobe Expert
March 10, 2021

Try this:

\b(?<!,)[\d.]+(?!,)

 

jctremblay
jctremblayCorrect answer
Adobe Expert
March 10, 2021

Or simply this if you are talking about tables cells.

^[\d.]+$

 

cmoke73Author
Inspiring
March 10, 2021

Wow!

Looks so simple.

Is this meaning: "each digit and each dot whithin a paragraph whitch contains nothing else?"