My string is:
your string here, please/do it by yourself.
I want to remove the word before the slash(with the slash) and at the end to get this:
your string here, do it by yourself.
My code is:
$string = 'your string here, please/do it by yourself.';
$parsed = preg_replace("\s*\w+\s+(?:w/)", '', $string);
its not do anything (not even print the string without changes..)