Hey all, I need to extract information before FINISH and the date and time after FINISH and paste in an excel. Usually there will be 1 line but could also be 3 in some cases. Here we have 5 lines as we can see with 5 records listed. How do I do this? Please advise.
Hi,
If you already have text from the cmd screen using GetText activty etc, the following sample helps you.
mc = System.Text.RegularExpressions.Regex.Matches(strData,"(?<DATA1>.+)\s+FINISH\s+(?<DATE>\d+\s+\w+\s+\d+)\s+(?<TIME>\S+)")
Sample
Sample20231130-4L.zip (3.4 KB)
Regards,
how about use Invoke Power Shell activity instead run directly in CMD window?
Then you can use Generate Data Table From Text and configure it doing some tests. Maybe you will need to do some string manipulation before converting
Cheers
Hi @rikulsilva thank you for your response. Yes, I’ve thought about getting it to data table and manipulating that, I was looking for a more elegant way to do this. Sorry forgot to mention this in the original post.
Hi @Yoichi thank you so much, I’ll try and let you know.
HI @Yoichi it worked, thank you although for some reason , I couldn’t open the sample as it got stuck at installing package. Thank you anyways!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.




