I want to Extract data from a DataTable of Column Name(Ref.No) as shown in below image

Ref No.
TRANSFER TO 39261377743 M.S.BROTHERS RETAIL IN /
CTR0046290 TRANSFER TO 30437488566 Mrs. POTTI MALATHI LA /
CMP00000000432641662AOEX476056 TRANSFER TO 33969597169 SRI JK LACE HOUSE /
/
SBICMPNEW CHARGES FOR_01-AOEX775821 TRANSFER TO 98353042666 /
001443154488 CKS7651188 TRANSFER TO 36429220649 INCOME TAX /
22023700086835CKS8843276 TRANSFER TO 36959659003 POOLING ACCOUNT GST-MM /
SPDCLPCBC1282CQ00749967 TRANSFER TO 37285000091 TSSPDC SEC NON OPERATI /
SPDCLTTPT2669CQ00768494 TRANSFER TO 62346723505 APSPDCL-TPT-NON OPERAT /
CMP00000000447242248AOF7770623 TRANSFER TO 52002039484 V /

I have a DataTable with column Name - Ref.No.
I want to extract Text which are Bold from a DataTable. How can I get that text… Please Help.
Thank You in Advance.

Hi @Praw1n

Convert DataTable to string

Use Regex expression

System.Text.RegularExpressions.Regex.Matches(InputStr.Trim,"(?<=TRANSFER\sTO\s\d{11})\s(\w.+)").Tostring.Trim

Regards
Gokul

Hi @Praw1n ,

Could you give this a try?

image

image

System.Text.RegularExpressions.Regex.Match(CurrentRow("Ref No.").ToString,"(?<=\d\s)[\D]+(?=\s\/)").Value

ExtractDataFromTable.xaml (9.1 KB)

Kind Regards,
Ashwin A.K

It worked…

Thanks a lot @ashwin.ashok

It worked…

Thanks a lot @Gokul001

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