3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $pat = '/.*【(.*)】.*/'; $content = '我发布了一个车品【京AAAAAA】,快来看看吧'; preg_match_all($pat, $content, $keywords); var_dump($keywords);
based on S6DvE
Output for 4.3.0 - 7.2.0
array(2) { [0]=> array(1) { [0]=> string(57) "我发布了一个车品【京AAAAAA】,快来看看吧" } [1]=> array(1) { [0]=> string(9) "京AAAAAA" } }