标签: php regex
我如何选择正则表达式:http://prntscr.com/6dfdzf 例子I:
my dad sees : aqwe kayak at noon : night
它应该只给我:
sees : aqwe, noon:night
答案 0 :(得分:3)
\S+\s*:\s*\S+
这个简单的正则表达式应该为你做。参见演示。
https://regex101.com/r/eS7gD7/24