I want to replace inch characters " with proper German quotation marks „example“.
An example String would be:
$string = `Mein Name ist "Joseph"`
I tried
str_replace("\"", '„', $string)
but of course it's replacing all of the inch characters with the same quotation mark
Mein Name ist „Joseph„
So I guess I need a regex to somehow replace the inch character before a word with „ and the inch character after the same word with “ to get the result
Mein Name ist „Joseph“
Despite reading how regex works, I can't really figure out how to achieve that.
Any tips would be gladly welcomed, thx!