Php 删除其中包含特定域的URL
例如,我有一组URLPhp 删除其中包含特定域的URL,php,regex,Php,Regex,例如,我有一组URL 我想删除任何包含feeds.feedburner.com的url。我将使用什么正则表达式?(php)使用此正则表达式: /feeds\.feedburner\.com/ 为什么要使用正则表达式?使用 顺便提一下,速记如下: if (parse_url($url, PHP_URL_HOST) != 'feeds.feedburner.com'){ // same outcome } +1对于parse_url,我不知道为什么人们对regex如此着迷,每个人都在
/feeds\.feedburner\.com/
为什么要使用正则表达式?使用
顺便提一下,速记如下:
if (parse_url($url, PHP_URL_HOST) != 'feeds.feedburner.com'){
// same outcome
}
+1对于
parse_url
,我不知道为什么人们对regex如此着迷,每个人都在到处使用它们。。。
if (parse_url($url, PHP_URL_HOST) != 'feeds.feedburner.com'){
// same outcome
}