From: Dan Bracuk on
Your two replace commands appear to cancel each other out.
From: MikerRoo on
You can do all of that in one regex statement -- which is faster because it
passes through the string only once.

The only way to get even faster is to use pure java.

Fastest would be assembly language.

Finally, there is a flaw in your logic. What happens if length falls right
in between chr(13) and chr(10)?


From: N0cT1v4Gus on
They don't "cancel each other out", because i don't know what the format of
the break statement is <br> or chr13/10, if they are <br> he should cut my
string like "hello world <b" so that is why i first replace it into chr13/10

So how can i put this all in one Regular expression then ?

Tank you !