Hi All,
I have problem in which there is notepad which has a data.
In that, I want to read data’s one by one in between ‘START TRANSACTION’ to ‘END TRANSACTION’. After that it will read next part and so on.
How to achieve this ?
S1CNP249.txt (1.2 KB)
S1CNP249.txt (2.0 KB)
Marta
(Marta Kopińska - Office Samurai)
December 14, 2022, 11:41am
2
Hi @Muralikrishna_Surve
Please try with the following regular expression:
(?<=TRANSACTION START)(.|\r|\n)*?(?=TRANSACTION END)
1 Like
Gokul001
(Gokul Balaji)
December 14, 2022, 11:49am
3
Hi @Muralikrishna_Surve
How about this expression?
System.Text.RegularExpressions.Regex.Match(YourString,"(?s)TRANSACTION START(.*?)TRANSACTION END").Tostring
Check out the XAML file
MultiplefilesRegex.xaml (6.7 KB)
Regards
Gokul
1 Like
Hi @Gokul001
Thanks for the quick reply.
But from above given solution it is running only 1st “TRANSACTION START & TRANSACTION END” and ending the process.
Requirement here is in 1 file there will be so many passages (Transaction Start & Transaction End) and in this it needs to loop through all the passages one by one.
Could you please help with this solution ?
arivu96
(Arivazhagan A)
December 15, 2022, 10:38am
5
Hi @Muralikrishna_Surve ,
Please use below xaml to extract the value.
MultiplefilesRegex.xaml (7.6 KB)
Regards,
Arivu
1 Like
Gokul001
(Gokul Balaji)
December 15, 2022, 11:06am
7
Hi @Muralikrishna_Surve
How about this expression?
System.Text.RegularExpressions.Regex.Matches(Inputtext.Trim,"(?s)TRANSACTION START(.*?)TRANSACTION END")
Check out the XAML file
MultiplefilesRegex.xaml (7.5 KB)
Regards
Gokul
1 Like
system
(system)
Closed
December 18, 2022, 11:08am
9
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.