What I want
Hello! I want to replace :)with smile.pngand :))by laugh.png.
Problem
the script finds :)inside :)), therefore it is laugh.pngnot displayed, only smile.png+)
This is what I have tried so far for :)):
preg_replace("/:)+(?!))/i",$image, $string))
Some other regular expressions I've tried:
"/\:\)+(?=\))/i"
"/\:+(?=\)\))/i"
But nothing wants to work that I tried.
source
share