Skip to main content
Inspiring
January 19, 2022
Answered

Grep find prices

  • January 19, 2022
  • 7 replies
  • 957 views

Hello 

 

I'am looking for the code to find Prices. I have a lot of text with € 25 / € 21 / € 10 this. Sometimes there are more prices. 

 

Kind regards,

Patrick

This topic has been closed for replies.
Correct answer Manan Joshi

Almost. Only the slash left. /


Try this

€\s+\d+,?\d+\s?\/?

-Manan

7 replies

pixxxelschubser
Community Expert
Community Expert
January 31, 2022

Are you really sure? Because of:

 

quote

... What i want is the last one with all spaces.


By @patrickbcm

 

pixxxelschubser
Community Expert
Community Expert
January 30, 2022
… but this one works for me:

(\h/\h)?€\h\d+(,\d{2})?


By @pixxxelschubser

 

Was that what you were looking for?

 

 

Inspiring
January 31, 2022

Both works for me.

 

€\s+\d+,?\d+\s?\/?

(\h/\h)?€\h\d+(,\d{2})?

pixxxelschubser
Community Expert
Community Expert
January 21, 2022

Hi

There are probably better variants, but this one works for me:

(\h/\h)?€\h\d+(,\d{2})?

pixxxelschubser
Community Expert
Community Expert
January 21, 2022

Hmmh? Are you sure?

The grep by @Manan Joshi does have the first screenshot as result!

 

As a sidenote:

You can use an underlined character style for this grep to confirm.

Inspiring
January 21, 2022

If you want you can make a grep for the last screenshot.

I use a character style italic for this.

pixxxelschubser
Community Expert
Community Expert
January 21, 2022

What kind of (special?) spaces do you use? Do you have some more examples with all possible variations or at the best an example document for us?

Inspiring
January 21, 2022

It is no longer necessary. Manan gave me the right answer.

€\s+\d+,?\d+\s?\/?

 

pixxxelschubser
Community Expert
Community Expert
January 20, 2022

No. You use: Space Slash Space.

 

But I'm a little confused.

What do you really want?

 

@Manan Joshis Grep finds:

 

 

Or do you want something like that? (without the "last" space)

Or with all spaces in between? (without the last space)

 

Inspiring
January 21, 2022

Sorry that my axplain is not so clear.

What i want is the last one with all spaces.

Community Expert
January 20, 2022

Try the following

€ \d+

-Manan

-Manan
Inspiring
January 20, 2022

He does not take the / and sometimes there is also € 26,50

Wat he is doing is 

€ 25 / € 21 / € 10 / € 26,50

-Patrick

Kasyan Servetsky
Legend
January 20, 2022

try this one:

€\s\d+(\,\d{2})?