if ($keepquotetags) { $regex = '#\[(?!quote)(\w+?)(?>[^\]]*?)\](.*)(\[/\1\])#siU'; } else { $regex = '#\[(\w+?)(?>[^\]]*?)\](.*)(\[/\1\])#siU'; }