Regex php匹配前缀中的字符串


Regex php match string in prefix

我有一个字符串,类似于:"aa 123xx123123.."或"aa12332432423."。我想找到"123xx123123"answers"12332432423"。如何将"aa"answers"aa"放在[]中以匹配以下内容:/[aa,aa ](['dx]{10,}).*/

(['dx]{10,})

试试这个。你不需要用火柴。使用搜索或查找。请参阅演示。

http://regex101.com/r/dK1xR4/6