I am trying to match
[history="e70b3ffc-beaf-423f-b084-72bc5bae3147"]History name here[/history]
and get the ID and the content between the "tags". And although the above works fine at https://regexr.com/3ilt2 it's won't match on my code and I cannot figure out why. Any ideas?
$parsed_string = preg_replace_callback(
// [history="ID"]ABC[/history]
'/\[history="(.*?)"\](.*?)\[\/history\]/',
function ($matches) {
return $this->parseHistories( $matches, 'alt-name' );
},
$parsed_string
);