Let's say I have the following code:
$string = "Hello! This is a test. Hello this is a test!"
echo str_replace("Hello", "Bye", $string);
This will replace all Hello in $string with Bye. How can I e.g. exclude all where there's ! after Hello.
Means, I want this output: Hello! This is a test. Bye this is a test!
Is there a way in php to do that?