由于有用性/硬度,我喜欢/讨厌正则表达式。(我不知道为什么,但我不能构造模式:()
我的数据库字段中有一些这样的记录
[(ip1=192.x.?.100)(id1=125485smds65)(date1=11.02.2011-15:00/15.06.2012-17:30)(text1=Some text that can include all brackets and/or parentheses & any chars etc, like < ( text . } , [ any ) ] { etc.**)][(ip2=x.x.20.?)(num2=1235845)(text2=many other words :))]...
好的,我想返回一个包含值的数组;
$result[ip1] = 192.x.?.100;
$result[id1] = 125485smds65;
$result[date1] = 11.02.2011-15:00/15.06.2012-17:30;
$result[text1] = Some text that can include all brackets and/or parentheses & any chars etc, like < ( text . } , [ any ) ] { etc.**;
$result[ip2] = 192.x.?.100;
$result[num2] = 1235845;
$result[text2] = many other words :)
您可以看到,括号中的数据数和括号数可以变化
那么,preg_match_all 正则表达式收集上述数据的真正模式是什么?