Java non-breajubg soce usuń
string.replaceAll("(^\\h*)|(\\h*$)","")
Annoying Antelope
string.replaceAll("(^\\h*)|(\\h*$)","")
string.replaceAll("\\p{Z}","");