st = st.replaceAll("\\s+","")

Read more of this post