Looking to remove rows whose character length is not equals to 10, and how to replace the 3rd last character from the rows if an specific character exists.
I would like to replace “O” or o with “0”.
I have tried working with Filter activity as well as
Dt1 = Dt1.Select(“LEN(0) = 15”).CopyToDataTable
But its not working
Please Suggest
ppr
(Peter Preuss)
September 8, 2021, 3:05pm
2
For the Length Part:
give try on Dt1 = Dt1.Select(“LEN([YourColName]) = 15”).CopyToDataTable
As alternate we can check LINQ for this
@ppr Thanks for the answer, How to replace the 3rd last character from the rows if exists
I would like to replace “O” or o with “0”.
ppr
(Peter Preuss)
September 8, 2021, 3:22pm
4
give a try on regex replace:
@ppr Not getting the last 3rd character and how to replace it .
ppr
(Peter Preuss)
September 8, 2021, 6:04pm
6
share sample values with us. Thanks
225ACHN1AZ
36AHDGBI2K
267HFJK3CB
88JHDSHI8U
678BCZHiJK
Expected Output :
225ACHN1AZ
36AHDGB12K
267HFJK3CB
88JHDSH18U
678BCZH1JK
ppr
(Peter Preuss)
September 8, 2021, 6:10pm
8
mayankjha986:
Looking to remove rows whose character length is not equals to 10, and how to replace the 3rd last character from the rows if an specific character exists.
I would like to replace “O” or o with “0”.
dont see any oO replacements in your samples and expected output
225ACHN0AZ
36AHDGBO2K
267HFJK3CB
88JHDSHO8U
678BCZHoJK
Expected Output :
225ACHN0AZ
36AHDGB02K
267HFJK3CB
88JHDSH08U
678BCZH0JK
@ppr Please find the updated data
ppr
(Peter Preuss)
September 8, 2021, 6:29pm
10
Pattern:
[oO](?=\S{2}\s*$)
Also tolerant on end for spaces etc.
Usable in Regex Replace as mentioned above.
Please tell us what is not covered? Thanks
@ppr - How to write the activity in UIPath.
Please Suggest
ppr
(Peter Preuss)
September 8, 2021, 6:33pm
12
Replace Activity or
Assign Activity:
newText = System.Text.RegularExpressions.Regex.Replace(YourStringTextVar, “oO ”, “0”)