Jump to content

How to replace line breaks?


Recommended Posts

I use "ControGetText" to exatact text in a Notepad file, and I want to let it "flattened", that is, delete all the line breaks.

Replacement of @LF, @CR, @CRLF seems to be failed :D

Any one can give me some hints? thx~~

eg.

Text in notepad:

This is the brok

en sentence, which

needs to be joined

together.

Result:

$string="This is the broken sentence, which needs to be joined together."

Link to comment
Share on other sites

lots of ways,

someone surely has a regexp that would do the job....

You can perform stringreplace operations on all undesired chars, replacing them with an empty string.

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...