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\
It's fairly simple. Use preg_replace and sorround all text captures with quotes.
preg_replace("/([a-z0-9]+)/i", '"$1"', $string);
You will have to find the replacement of preg_replace for java :)