I want to transform in Java:
dd fdas dd fdas fads f das fdasf + - || dasf into: \"dd\" \"fdas\" \"dd\" \"fdas\" \"fads\" \"f\" \"das\" \"fdasf\" + - || \"dasf\
replaceAll can do this:
String result = input.replaceAll("(\w+)", "\"$1\"");