简单正则

WBOY
Release: 2016-06-13 13:41:48
Original
761 people have browsed it

求一个简单正则
请把‎(105)
的105给提取出来,谢谢。

------解决方案--------------------
$str='‎(105)';
preg_match('/\(.*\)/',$str,$match);
你看这样行不行
------解决方案--------------------

PHP code

$str='<span class="cnt">‎(105)</span>';
preg_match('/\(([\d]+)\)/', $str,$foo);

echo $foo[1]; <div class="clear">
                 
              
              
        
            </div>
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