Hi, everyone
I tried using the “matches” activity but failed.
tt.txt (1.0 KB)
The version: Studio Pro 2020.4.3
Regards,
Hi, everyone
I tried using the “matches” activity but failed.
tt.txt (1.0 KB)
The version: Studio Pro 2020.4.3
Regards,
HI,
It seems many extra characters (0x200e) exist in the file,
If you don’t need it, can you try the following expression before using regex?
strData = strData.Replace(Chrw(&H200E),"")
Sample
Sample20240821-1.zip (3.0 KB)
Regards,
Hi, @Yoichi
I’m sorry to reply now, it’s a busy morning.
Thanks for giving a perfect reply. During my exploration, I found that the text included extra characters, but I didn’t know what they were. I didn’t know how to visualize these extra characters or how to describe the phenomenon, so I provided the text file directly.
The solution works very well. I’d appreciate it if you could tell me how to go about getting what non-visible extra characters are in the text. Thank you again for your kind help.
Regards,
Hi,
Basically, it’s necessary to check what character exist in code basis.
If we can use text editor which can show character code, it easily show us it (as the above image)
Or we can also check character code using the following expression in UiPath.
String.Join(",",yourString.Select(Function(c) AscW(c).ToString))
(In this case, character code is displayed as decimal. 8206=0x200E)
Regards,
Hi,
I’m grateful for your help.
I really don’t know much about encoding, and my understanding is that I need to visualize the character encoding with the AscW() function first, and then convert it to hexadecimal. Then put it into ChrW() to remove the extra characters.
For the decimal to hexadecimal conversion, I used the following code so that all the processes could be connected.
If there is anything wrong, you can let me know, thank you very much.
Regards,
HI,
It seems the above is no problem.
Please note that, as 8206 equals &H200E, we can also write the expression as the following.
strData = strData.Replace(Chrw(8206),"")
Regards,
Hi,
Fine, that’s a great reminder.
Regards,
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.