开发者

php, get some code from text

开发者 https://www.devze.com 2023-01-07 22:39 出处:网络
how from this text get WORD开发者_如何学C and WORD2. text tex asad t text [mycode]WORD[/mycode] tex asda [mycode]WORD2[/mycode] asdasdasd

how from this text get WORD开发者_如何学C and WORD2.

text tex asad t text [mycode]WORD[/mycode] tex asda [mycode]WORD2[/mycode] asdasdasd

I try using preg-match, but i fail


$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);
0

精彩评论

暂无评论...
验证码 换一张
取 消