Regex activity issue

Hey Community, I have a question I want to extract three field from a text file, should I declare three regex blocs or just write three separate regex into one bloc


Hi @BlueBird1
Use 3 regex blocks for 3 different text fields.


I will try if it works

or you can directly assign the
your_Variable = Regex.match(Your_String,“regexCode”).tostring
for this you have to import the regex

It didn’t, it just extract the first bloc regex


Please provide a sample, output and tell us what is consistent.

If you do this, you will have three reliable patterns.



Please check your regex code, is it correctly extracted or not. If it is extracted correctly it will print all extracted fields. You need to use 3 regex blocks for 3 text fields.

@Yoichi @ppr @Srini84

we agree to Steven. with samples we have a better chance to check the fitting solution options

1 Like

@ppr @Steven_McKeering
Here is the sample data
@BlueBird1 its modified dont worry.
TXTfile1.TXT (4.7 KB)


Give this file a go:

Main.xaml (13.1 KB)




@Steven_McKeering please I retest the extraction with this pattern
(?<=REPORT ID:\s+VSS-120[\S\s]+\sACQUIRER TRANSACTIONS[\S\s]+?ORIGINAL SALE\s+[A-Z]\s*[A-z0-9]+\s+)\d+\s+[\d,A-Z]+(?=\s*[\r\n]+\s+TOTAL ORIGINAL SALE)

on the regex test, it highlightes the values, but while building the data table the cells where the extracted values need to be stored are empty

Add some logs to make sure its extracting something.

Its probably your input text has changed.

I will try, but it extract the text file name that contains the values thus they’re not stored