How to clean up my text after using a get text activity?

Hi guys,

I am using a get text from UI automation activity and since I want the whole conversation and I don’t know how the conversation will look like, I am obliged to pick the whole conversation box for my selector, I can’t pick the bits of text individually because again I don’t know how the conversation will look like, The good point is, I am getting the whole conversation text, the problem though, the end result is full of empty lines and spaces at the beginning of each lines (see text file), so how could I get around this issue ?

Many thanks

Kaiji
Reply1.txt (2.4 KB)

1 Like

try this @kaiji_San

Sequence.xaml (7.2 KB)
result

@kaiji_San
Try the Regex replace method

System.Text.RegularExpressions.Regex.Replace(YourString,"\s+"," ").ToString.Trim

output
Status is offline Jean Bernard 1st degree connection · 1st Directeur Cloud Informatique Today Jonas Jolly sent the following message at 9:16 PM View Jonas’s profile Jonas Jolly 9:16 PM Bonjour raphael ajoute moi Message request accepted Jean Bernard sent the following message at 9:18 PM View Jean’s profile Jean Bernard 9:18 PM Ajoute ! Jonas Jolly sent the following message at 9:30 PM View Jonas’s profile Jonas Jolly 9:30 PM Raph tu travails demain ? Jean Bernard sent the following message at 9:31 PM View Jean’s profile Jean Bernard 9:31 PM Oui je travail et toi ??? Reply to conversation with “Super” Super

Thank you Sir

Thank you Sir.

I realized that it’s also possible to actually get the last message from the person I am talking with because his response is comprised between

9:31 PM(or AM)
-----last reply------
Reply to conversation

Can I abuse your time and ask you one more regex formula to only get his last response ?

Many thanks

1 Like

messaged you

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