时间:2021-07-01 10:21:17 帮助过:2人阅读
。我只想要src的url地址,还要匹配
src后面没有““”双引号,有的是单引号,而且alt和title有的/((http|https):\/\/)+(\w+\.)+(\w+)[\w\/\.\-]*(jpg|gif|png)/
src后面没有““”双引号单引号
没有alt
没有title
都没有
EOF;$reg = '/
]*src=[\'"]?([^\'"\s]+)[\'"]?[^>]*>/im';$matches = array();preg_match_all($reg, $str, $matches);print_r($matches);
src后面没有““”双引号单引号
没有alt
没有title
都没有
EOF;$reg = '/
]*src=[\'"]?([^\'"\s]+)[\'"]?[^>]*>/im';$matches = array();preg_match_all($reg, $str, $matches);print_r($matches);
src后面没有““”双引号单引号
没有alt
没有title
都没有
EOF;$reg = '/
]*src=[\'"]?([^\'"\s]+)[\'"]?[^>]*>/im';$matches = array();preg_match_all($reg, $str, $matches);print_r($matches);
多谢各位!!!