【发布时间】:2017-04-22 11:20:38
【问题描述】:
我正在尝试获取两个特定匹配项之间的字符串,例如两个主题标签。
我想要达到的目标:
输入:
some text in front ##hi there## some text behind输出:
hi there
使用/%%(.*)%%/,返回##hi there##。
提前致谢
【问题讨论】:
-
语言是什么?
-
@WiktorStribiżew 对不起,我不知道这是否相关。这是PHP
-
访问
$matches[1]
标签: php regex preg-match