how to make multiple line string to single line string?
<p>I have below string</p>

<pre><code>String str="select * from m_menus;

select * from m_roles";
</code></pre>

<p>I want above string in one line
like</p>

<pre><code>String str="select * from m_menus;select * from m_roles";
</code></pre>

<p>I have tried </p>

<pre><code>str1=str.replace("[\r\n]+", " "); 
</code></pre>

<p>and also</p>

<pre><code>str1=str.replace("\n"," "); 
</code></pre>

<p>Both are not working.</p>
