Sign in to follow this  
Followers 0
Viktor

Removing new line characters from a string

4 posts in this topic

#1 ·  Posted (edited)

Hi Scripters,

I have a string I captured from a web page and it has somewhere in it a newline char (I know that there are several different types of this but I have no idea how they differ), since when I write it to a text file it shows up in two lines, which makes the file useless for importing it to my financial software.

How could I get rid of the offending new line char? I have tried StringStripCR, it did nothing. Any ideas?

Thanks a lot!

Viktor

Edited by Viktor

Share this post


Link to post
Share on other sites



Good guess! :) Worked! Thanks a lot! Viktor

I'm guessing there might not be CR's but rather CRLF...

Try

StringReplace($yourText, @CRLF, " ")
If that doesn't work trying using the same thing except with @LF

Share this post


Link to post
Share on other sites

Good guess! :) Worked! Thanks a lot! Viktor

I'm guessing there might not be CR's but rather CRLF...

Try

StringReplace($yourText, @CRLF, " ")
If that doesn't work trying using the same thing except with @LF

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0