开发者

Cleaning up a String in Visual Basic - Those Annoying Rectangles

开发者 https://www.devze.com 2023-01-19 19:16 出处:网络
Can anyone give me some advice as to how to clean up a string in Visual Basic .NET? I\'m creating a string as a report with l开发者_如何学Pythonine breaks. However, the string is built based off of sc

Can anyone give me some advice as to how to clean up a string in Visual Basic .NET? I'm creating a string as a report with l开发者_如何学Pythonine breaks. However, the string is built based off of screen scrapes from a TN3270 emulator. The string is saved successfully with all of the data I require, but those annoying rectangle symbols show up once I send it to a notepad text file. Do you know anyway I can strip those out and clean up the output?

Cleaning up a String in Visual Basic - Those Annoying Rectangles


s.Replace(vbCr, vbCrLf);

Replace vbCr with vbLf depending on what is in your file.

Alternatively, just open it in WordPad.


You can use Microsoft's VBScript scripting library This allows you to use regex in vb6

For more help refer to

How to use Regular Expressions in Visual Basic

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号