我想从包含嵌套引号的字符串中删除所有引号。
它不适用于嵌套的 qoutes:
preg_replace("/\[quote(.*?)\](.*?)\[\/quote\]/i","", $text);
这适用于:
[quote=admin]Welcome to RegExr 0.3b, an intuitive tool for learning, writing, and testing Regular Expressions. Key features include: [/quote]
但不适用于:
[quote=admin]Welcome to RegExr 0.3b, [quote] an intuitive tool for learning, [/quote] writing, and testing Regular Expressions. Key features include: [/quote]
想删除所有 qoute 块