【发布时间】:2015-08-16 11:46:15
【问题描述】:
我有这个字符串:
<span itemprop="author" itemscope="" itemtype="http://schema.org/Person"><span itemprop="name">gegi123</span></span>
我需要gegi123
我试过这个:
/<span itemprop="author" itemscope="" itemtype="http://schema.org/Person"><span itemprop="name">(.*?)</span></span>/
但显示错误:
Warning: preg_match_all(): Unknown modifier '/' in /var/www/post/main.php on line 29
【问题讨论】:
-
我投票结束这个问题,因为 stackoverflow 不是免费的代码编写服务。
标签: php regex string preg-match between