Hi,
I'm using preg_replace (or trying to use anyway) to find every instance of ' (single quote?) in a string and replacing it. However, if there are more of the same char in a row, I want them to count as one...
Like this:
$string1 = " ' "
$string2 = " ''''' "
I want both string to translate into " hello " using preq_replace.
This is the code I'm using:
$string = preg_replace( "/('+)/", "hello", $string );
Why doesn't this work?
Thansk in advance / jek