Regular Expression to split "/n"
Posted
by Gnaniyar Zubair
on Stack Overflow
See other posts from Stack Overflow
or by Gnaniyar Zubair
Published on 2010-04-02T06:11:11Z
Indexed on
2010/04/02
6:13 UTC
Read the original article
Hit count: 457
regular-expression
I want to split the /n from my string in Java. For example, I have one String field which has 2 lines space ( /n). I have to find out lines ( wherever mopre than one lines is coming) and should replace with one line spaces.
"This is Test Message
thanks Zubair "
From the above example, there are more spaces between "This is Test Message" and "thanks". So i want to reduce as only one line instead of 2 lines.How to do that?
© Stack Overflow or respective owner