我需要有关此 preg_match 脚本的帮助。我想要一个在 bbcode 中的文本。所以这将是字符串:[caption id="attachment_123" align="alignleft" width="100" caption="This is the text that I want"]
你会怎么做?重要的是,像 id 和 align 这样的值不会一直相同。我尝试了类似的东西preg_match('#\[caption(?:.*?)caption=\"(.*?)\"\]#s',$result,$array);
谢谢您的帮助!phpheini