Issue
I have below string
String str="select * from m_menus;
select * from m_roles";
I want above string in one line like
String str="select * from m_menus;select * from m_roles";
str1=str.replace("[\r\n]+", " ");
and also
str1=str.replace("\n"," ");
Both are not working.
Solution
If you want to use regex, you should use the String.replaceAll()
method.
Answered By - TZHX
Answer Checked By - Gilberto Lyons (JavaFixing Admin)