I have a few preg_replace functions that are working fine on my local test server but not at all on my production server (everything just passes through unchanged.
The first is to convert <span> tags to a different tag, and it goes like this:
[code=php]$post_content = preg_replace(‘|<span class=”(.*)”>(.*)</span>|eis’,'<pstyle:$1>$2<pstyle:Body Text>’,$string);
On my test server, it takes something like
[CODE]<span class=”test”>this is test text</span>
and turns it into
[CODE]<pstyle:test>this is test text<pstyle:Body Text>
but on my production server it changes nothing.
The next one is to strip out everything between two span tags, and it goes like this:
[code=php]$post_content = preg_replace(‘|<span class=”writely-comment(.*)”>(.*)</span>|eis’,”,$post_content);
Any thoughts?