php怎么进行正则匹配

WBOY
Release: 2016-06-13 10:36:04
Original
1217 people have browsed it

php如何进行正则匹配
如何使用php正则匹配,匹配下面这个连接中 “股票走势”后的“较强”这几个字,
http://stockapp.finance.qq.com/doctor/sh600209.html

------解决方案--------------------

PHP code
$s=file_get_contents('http://stockapp.finance.qq.com/doctor/sh600209.html');preg_match('/<span>([^股票走势)/s',$s,$m);echo  $m[1];<div class="clear">
                 
              
              
        
            </div></span>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!