Regex find

Hi;

I want to pull the expression between Regexle Amount and Subtotal.

Ouantity Item no. Description Unit Price Tax Amount
15 1011 Sprocket — Large 38.50 G 577.50
15 1010 Sprocket — Med 18.95 G 284.25
15 1009 Sprocket — Small 8.90 G 133.50
Subtotal 995.25

Hi @Gorkem_Batuhan_MORKOC

Can you share Expected output

To get all the Values from Amount to Subtotal

Here is the regex expression

Regards
Gokul

1 Like

Thank you very much Mr.Gokul

Hi @Gorkem_Batuhan_MORKOC

Can you share the expected output

Regards
Gokul

15 1011 Sprocket — Large 38.50 G 577.50
15 1010 Sprocket — Med 18.95 G 284.25
15 1009 Sprocket — Small 8.90 G 133.50

Hi @Gorkem_Batuhan_MORKOC

Use Assign Activity

LHS: Create an variable
RHS: System.Text.RegularExpression.Regex.Match(“Input String”,"(?s)(?<=Tax\sAmount\n)(.*?)(?=Subtotal)").tostring

Here is the Regex expression

For more Information refer the below regex

Regards
Gokul

2 Likes

Hi @Gorkem_Batuhan_MORKOC

if you need data as data table we can go with generate data table activity!

Regards

1 Like

for regex spanning over multiple line we do have to handle the \n as the dot (all chars) is excluding the line break. Have a look here:

grafik

if possible datatable parsing is recommended as well

2 Likes