相关疑难解决方法(0)

php regex在href标签内获取字符串

我需要一个正则表达式,它会给我一个href标签内部的字符串和引号内部.

例如,我需要在以下内容中提取theurltoget.com:

<a href="theurltoget.com">URL</a>
Run Code Online (Sandbox Code Playgroud)

另外,我只想要基本网址部分.即http://www.mydomain.com/page.html我只想要http://www.mydomain.com/

php regex html-parsing

13
推荐指数
5
解决办法
8万
查看次数

标签 统计

html-parsing ×1

php ×1

regex ×1