我正在使用 PHP,我有这样的文字:
first [abc] middle [xyz] last
我需要了解括号内外的内容。在 StackOverflow 中搜索,我找到了一个模式来获取里面的内容:
preg_match_all('/\[.*?\]/', $m, $s)
现在我想知道获取外部内容的模式。
问候!
php regex preg-match-all
php ×1
preg-match-all ×1
regex ×1