 <p>yourString.replaceAll("&amp;b=52","");</p> <p><a href="http://download.oracle.com/javase/1.4.2/docs/api/java/lang/String.html#replaceAll%28java.lang.String,%20java.lang.String%29" rel="nofollow">String API reference</a></p>