[eluser]Hoopoe[/eluser]
Is there a known problem using preg_replace() within views ? Obviously, the function is used all over the place in the system.
I have a preg_replace that I have trialled in a php page without CI where it works fine. In the CI view for which it's intended, it does nothing. And I just don't know why!
The preg works on urls. Is that the issue ?
Here's the preg:
Code:
$pat ='/(^[a-z\/\.\:]*?sheet\/)(pub)([a-zA-Z0-9\=\?]*)(\&output;\=html)/';
$rep ='$1ccc$3#gid=0';
$theoriginal = preg_replace( $pat, $rep, $published );
Can someone suggest what may be wrong and any workarounds or solutions ?
Tom