Matches RegEx activity

Hello everyone!
I’m trying to get from this PDF file the number of the “Delivered price” row that is in this case 67.91.

And I’m trying to do it with the Matches activity:

But I don’t know what to put in the value field to get it.
Can somebody help me?

Thanks in advance :slight_smile:

Regards, Elisa.

Hi,

Can you share result text of ReadPdfText activity as a file?

Regards,

HI,

Can you share text file using Write text file activity?

Regards,

Hi,

For now, can you try the following expression? If it doesn’t work, can you share the above as text file?

System.Text.RegularExpressions.Regex.Match(strData,"(?<=Delivered Price Php / Liter\s*)[.\d]+").Value

Regards,

I put that expression but but shows nothing in the message box- for each after.

Hi @ELISA_ARTALEJO_BARINAGA

You can try with this expression

System.Text.RegexExpressions.Regex.Match(stringvariable,”(?<=Delivered Price Php / Liter).*”).ToString.Trim

Note : replace the double quotes manually after copying them in your flow

Regards
Sudharsan

You should use it in assign activity @ELISA_ARTALEJO_BARINAGA

Left side on assign - String variable name
Right side on assign - System.Text.RegexExpressions.Regex.Match(stringvariable,”(?<=Delivered Price Php / Liter).*”).ToString.Trim

No need of Regex activity

Regards
Sudharsan

1 Like

Hi,

If you want to use Matches activity, the following sample helps you.

Pattern is (?<=Delivered Price Php / Liter\s*)[.\d]+

Sample20221024-1L.zip (3.1 KB)

Regards,

1 Like

Thanks to both of you! @Yoichi @Sudharsan_Ka
Both are valid solutions :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.