I am having problems getting a regex to work in PHP.
Here is the code:
Code: Select all
<?php
$string = "[check=wisdom,13]You recall that Maesyn had mentioned he knew of a [i]genasi[/i] sage who would know something of a moderately powerful Primordial House called House Golaxad, of which the being in the crystal previously, Cozox, was a member of. The genasi was said to reside in SkyClave, of which the scene through the window of the room in the portal seems to be, given your memory of the place when you traveled there to arrive at Restwell Keep and the Chaos Scar area of High Imaskar.[/check]";
$string = preg_replace('/\[check=.+\[\/check\]/gi', "CHECK REMOVED", $string);
echo $string;
?>