2014-09-15, 12:26 AM
Thank you, but it's better to use another regexp to support not only the English languge in descriptions. Something like this:
$pattern = array("#\[spoiler=(?:"|\"|')?(.*?)[\"']?(?:"|\"|')?\](.*?)\[\/spoiler\](\r\n?|\n?)#si", "#\[spoiler\](.*?)\[\/spoiler\](\r\n?|\n?)#si");