3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = "categoryEnglishName:shouji dangers:(newuuid deep1条 IpCrossRule MobileCrossAreaRule) dangers:(FirstTimeImageRule OR DifferentIpmobledress) brid:(881581631eadc6e649b7dcb091a59396 OR 6dde9f581f114e2737bc56719990ec7a)"; preg_match_all('/(([a-zA-Z]+)\:\(([^\)]+)\))/', $str, $m); var_dump($m);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(4) { [0]=> array(3) { [0]=> string(58) "dangers:(newuuid deep1条 IpCrossRule MobileCrossAreaRule)" [1]=> string(53) "dangers:(FirstTimeImageRule OR DifferentIpmobledress)" [2]=> string(75) "brid:(881581631eadc6e649b7dcb091a59396 OR 6dde9f581f114e2737bc56719990ec7a)" } [1]=> array(3) { [0]=> string(58) "dangers:(newuuid deep1条 IpCrossRule MobileCrossAreaRule)" [1]=> string(53) "dangers:(FirstTimeImageRule OR DifferentIpmobledress)" [2]=> string(75) "brid:(881581631eadc6e649b7dcb091a59396 OR 6dde9f581f114e2737bc56719990ec7a)" } [2]=> array(3) { [0]=> string(7) "dangers" [1]=> string(7) "dangers" [2]=> string(4) "brid" } [3]=> array(3) { [0]=> string(48) "newuuid deep1条 IpCrossRule MobileCrossAreaRule" [1]=> string(43) "FirstTimeImageRule OR DifferentIpmobledress" [2]=> string(68) "881581631eadc6e649b7dcb091a59396 OR 6dde9f581f114e2737bc56719990ec7a" } }