Sc100
(Sean )
1
Greetings,
I have successfully transferred regex results to datatables via:
However, I am getting stuck on trying to put each line (denoted by a blue dot next to it) in a row, in a 1 column datatable
Keep in mind, the regex used to capture this was:
System.Text.RegularExpressions.Regex.Match(QuoteTxt,"Item Description[\s\S]+?Final Quote").Value
So, if I try to use the method of row count = regex count, it is giving a very high number.
I really appreciate the help.
Thank you so much!
1 Like
Hey @Sc100
Your pattern would be matching everything from start to finish. You want to match line by line?
If yes, try this regex pattern:
System.Text.RegularExpressions.Regex.Match(QuoteTxt,“^.*”).Value
Hopefully this helps 
Cheers
Steve
1 Like
Sc100
(Sean )
3
Hi Steve,
Thank you for the answer, it definitely captures a line.
I added [^.*] so it captures all of the lines.
However, when I do the matches. count, it is still counting each individual letter/character, and not counting the lines.
I am getting a count of 500, but it should really be a count of 20.
Any ideas?
Sc100
(Sean )
4
Looking at Regextester site,
I got what I was looking for when I selected these flags:
However, selecting multiline in the Matches activity settings, it is not selecting all the lines like the regextester website:
Thank you in advance!
Hi @Sc100 ,
Have you tried executing with that settings/Regex Expression ? It does not necessarily indicate always the capturing of all the lines.
Check by executing first and let us know if you are still not able to get the results.
1 Like
Sc100
(Sean )
6
Hey, that did it.
Thank you for the tip!
Also, big shout out to Steve for stepping in with the regex pattern!
You both helped a ton.
1 Like
system
(system)
Closed
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.