如何从本文中获取WORD和WORD2。
text tex asad t text [mycode]WORD[/mycode] tex asda [mycode]WORD2[/mycode] asdasdasd我尝试使用preg-match,但失败了
发布于 2010-07-15 16:06:25
$str = "text tex asad t text [mycode]WORD[/mycode] tex asda [mycode]WORD2[/mycode] asdasdasd";
preg_match_all("/\[mycode\](.*?)\[\/mycode\]/", $str, $preg);
print_r($preg);https://stackoverflow.com/questions/3253568
复制相似问题