Regex for extracting data from a Table

Hello Developers,
I want a regex code for extracting below data in the form of table. Each table is ending at Subtotal and their amount

DAILY ACCOUNT ACTIVITY
Deposits
POSTING DATE DESCRIPTION AMOUNT
12/1 DEPOSIT 4,180.79
12/8 DEPOSIT 1,538.73
12/9 DEPOSIT 5,216.37
12/15 DEPOSIT 279.87
12/18 DEPOSIT 1,974.77
12/19 DEPOSIT 1,856.78
12/29 DEPOSIT 995.53
Subtotal: 16,042.84
Electronic Deposits
POSTING DATE DESCRIPTION AMOUNT
12/3 CCD DEPOSIT, BANKCARD MTOT DEP 76.22
12/8 CCD DEPOSIT, BANKCARD MTOT DEP 468.22
12/10 CCD DEPOSIT, MMC-DISB ACCT PAYMENT 442.35
12/19 CCD DEPOSIT, BANKCARD MTOT DEP 308.74
12/22 CCD DEPOSIT, BANKCARD BTOT DEP 2,735.42
Subtotal: 4,030.95

use regex like System.Text.RegularExpressions.Regex.Match(row.item(“Yourcolumnname”),"[0-9,]+.[0-9]+").value

Hope you understand this solution

Thanks for your solution, can you please send me regex code which i can use in matches activity

I already send you. you can use this in assign activity and store in a variable

Any other solution, that i can write in regexr.com

1 Like

Hi @Rakesh_Yadav ,

You can try this (?<=POSTING DATE DESCRIPTION AMOUNT\n)(.|\n)*?(?=Subtotal:)

Test here regex101: build, test, and debug regex

Cheers

1 Like

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