My problem is, that this:
preg_replace(\'/(?<=\\>)\\b\\w*\\b|^\\w*\\b/\', \'$&\', $string);
Does not work and
Try with this instead
preg_replace('/(?<=\>)\b\w*\b|^\w*\b/', '$0', $string);
$0 means it will become the first thing matched in your regex, $1 will become the second etc.
You could also use back-references; \0 gets the first thing matched back from where you are, \1 gets the second thing matched back etc. More Info