[img]XXXXXXg;base64,iVQA/XXXXXXXXXXXXXXX[/img]
$s = '[img]XXXXXXg;base64,iVQA/XXXXXXXXXXXXXXX[/img]';echo preg_replace('/(?<=])[^[]+/', '', $s);
$s = '[img]XXXXXXg;base64,iVQA/XXXXXXXXXXXXXXX[/img]';echo preg_replace('/(?<=])[^[]+/', '', $s);
$s = '[a]XXXXXXg;base64,iVQA/XXXXXXXXXXXXXXX[/a]';echo preg_replace('/(?<=])[^[]+/', '', $s);
echo preg_replace('/(?<=\[img\])[^[]+/', '', $s);
$str = '[img]XXXXX[/img]';$regx = '/\[img\](.*)\[\/img\]/';$rep_result = preg_replace_callback( $regx, function($match){ return str_replace($match[1],'',$match[0]); }, $str);