I want to remove all the words or lines if any found before Transaction Reference Date
Note: data can be anything before Transaction Reference Date.
E.g.
Input
"Data arrived
30/2/2021
Transaction Reference Date- 7/2/2021 for user xyz.
Reference package information- xbyysss"
Output:
"Transaction Reference Date- 7/2/2021 for user xyz.
Reference package information- xbyysss"
Hi @Mansi_Mhatre
Try below code
strOutput= strInput.Substring(strInput.IndexOf(“Transaction”))
Hope the above code will work for you
Thanks
1 Like
Gokul001
(Gokul Balaji)
3
Hi @Mansi_Mhatre
You can try with Regex expression.
Can you send the Input text in preservative format
Regards
Gokul
Hi @Mansi_Mhatre
You can use following Regex:
System.Text.RegularExpressions.Regex.Match(Input_str,"(?=Transaction)[\s\S]*").Value.Trim
Hope this will work for you
Regards,
Vinit M
Gokul001
(Gokul Balaji)
5
Hi @Mansi_Mhatre
Use Assign activity
LHS - Create an Variable
RHS - System.Text.RegularExpressions.Regex.Match(“Input String”,“(?<=\d{4})[\S\s]*”).Tostring.Trim
Refer the screenshot

Hope it will works
Regards
Gokul
Gokul001
(Gokul Balaji)
6
Kindly mark the appropriate post as solved, If you query is resolved @Mansi_Mhatre
So, that it will help others to
Regards
Gokul
anjasing
(Anjali)
7
Thank you so much. It worked for me.