A albatror New Member May 12, 2012 #1 I cant seem to get this right !I'm trying to replace same amount of spaces with the same amount of other characters:\[code\]$s="abc def f";echo preg_replace('/[\s*]+/', 'X', $s);\[/code\]Expecting abcXXdefXf
I cant seem to get this right !I'm trying to replace same amount of spaces with the same amount of other characters:\[code\]$s="abc def f";echo preg_replace('/[\s*]+/', 'X', $s);\[/code\]Expecting abcXXdefXf