Mesut_Can
(Mesut Can)
1
Hi,
The box section contains only letters. Example xxxxxx yy zzzzz. The values here can change constantly. xx yyyyyy zz maybe.
My question is, I just want to delete the row with the negative amount completely.
For example, I want to delete this data 01.12.2023 2477 xxxxxx yy zzzzz 240912.03 241076.36 -164.33
vrdabberu
(Varunraj Dabberu)
2
Hi @Mesut_Can
Try this
System.Text.RegularExpressions.Regex.Replace(Input,"\d+.*\-\d+.*","")
Hope it helps
Regards
vrdabberu
(Varunraj Dabberu)
3
Hi @Mesut_Can
Input:
=> Use below syntax in Assign activity:
Output= System.Text.RegularExpressions.Regex.Replace(Input,"\d+.*\-\d+.*","")
=> Use Write Text File to write the output
Output:
Refer below workflow for better understanding
Regards
Anil_G
(Anil Gorthi)
4
@Mesut_Can
Welcome to the community
Do you need to check only the last column for negative values …if so you can use this
This checks strictly in the last column always…and also replaces the bew line as well
.+(?<=-\d+(\.\d+)?$)\r?\n
System.Text.RegularExpressions.Regex.Replace(str,".+(?<=-\d+(\.\d+)?$)\r?\n","")
Cheers
1 Like
Mesut_Can
(Mesut Can)
5
Thank you very very much.
2 Likes
vrdabberu
(Varunraj Dabberu)
6
You’re Welcome @Mesut_Can
Happy Automation
1 Like
system
(system)
Closed
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.