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";
I have tried
str1=str.replace("[\r\n]+", " ");
and also
str1=str.replace("\n"," ");
Both are not working.