【发布时间】:2016-05-26 21:14:29
【问题描述】:
我有这种类型的字符串:
some text that can contains anything ((12.1,5.2))another text that can contains anything ((1,8.7)) and so on...
事实上我不知道如何获得:
[0] 一些可以包含任何内容的文本 ((12.1,5.2))
[1] 另一个可以包含任何内容的文本 ((1,8.7))
...
我试过了:preg_match_all('#(.*\(\([0-9\.]+,[0-9\.]+\)\).*?)#',$lines,$match); 但肯定不行。
我还尝试添加“U”选项和?在 * 和 + 之后,但没有更多结果。
谢谢
【问题讨论】:
标签: php regex preg-match-all