Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

GREP within paragraph-style: all digits except price

Engaged ,
Mar 10, 2021 Mar 10, 2021

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?

TOPICS
Scripting , Type
743
Translate
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 , Mar 10, 2021 Mar 10, 2021

Or simply this if you are talking about tables cells.

^[\d.]+$

 

Translate
Community Expert ,
Mar 10, 2021 Mar 10, 2021

Try this:

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

 

Translate
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 ,
Mar 10, 2021 Mar 10, 2021

Or simply this if you are talking about tables cells.

^[\d.]+$

 

Translate
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
Engaged ,
Mar 10, 2021 Mar 10, 2021

Wow!

Looks so simple.

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

Translate
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 ,
Mar 10, 2021 Mar 10, 2021

[ ] are charaters set. So we are looking at ONLY digits and dot one or more time between begining and end of paragraph.

Translate
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
Engaged ,
Mar 11, 2021 Mar 11, 2021

Thank you.

It was very helpful.

Translate
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
Engaged ,
Mar 11, 2021 Mar 11, 2021

Ist it possible to reverse that to: get everything except digits and dots?

Translate
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 ,
Mar 11, 2021 Mar 11, 2021
LATEST

If you use this 

^[\d.]+$

to format the digits and dot, than the everything else is apply by the paragraph style.

Unless you want only digits and comma,  then:

^[\d,]+$​




Translate
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