Bek1123
(Omadbek Redjapov)
March 22, 2024, 5:59am
1
I am facing an issue to remove newline character “↵”
I have tried remove/replace functions inside the assign activity but still did not work:
Environment.NewLine
\u21b5 (this seems to be “↵” character code but not working)
\r\n\t
vbcrlf, vblf
/\s\s+/g
remove character with remove(“↵”) but that did not work as well.
This character is generated from csv of a legacy application.
I have tried so many options, but the character is stubborn. Any options I can try further?
Yoichi
(Yoichi)
March 22, 2024, 6:04am
2
Hi,
Can you share the string as file?
Or
Can you try to use the following expression then identify code of the character.
String.Join(",",yourString.Select(Function(c) AscW(c).ToString))
Regards,
@Bek1123
you’ve mentioned that the character might be represented by its ASCII code (which is ↵ for newline), you can try to directly replace it using its ASCII code. In VB.NET , you can use Chr() function to represent characters by ASCII code. Here’s how:
strText = strText.Replace(Chr(8629), “”)
1 Like
system
(system)
Closed
March 25, 2024, 6:08am
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.