<?php
$str = '<b>abc</b>';
$pattern = '/<b>(.*)<\/b>/';
$str = preg_replace($pattern, '\\1', $str);
var_dump($str);
<?php
$str = '<b>abc</b><b>bcd</b>';
$pattern = '/<b>.*?<\/b>/';
//$pattern = '/<b>.*?<\/b>/U';
$strs = preg_match_all($pattern, $str, $match);
var_dump($match);
<?php
$str = '中文';
$pattern = '/[\x{4e00}-\x{9fa5}]/u';
//$pattern = '/['.chr(0xb0).'-'.chr(0xf7).']['.chr(0xa1).'-'.chr(0xfe).']/';
preg_match($pattern, $str, $match);
var_dump($match);
<?php
// 请写出以139开头的11位手机号码的正则表达式
// 13988888888
//
$str = '13888888888';
$pattern = '/^139\d{8}$/';
preg_match($pattern, $str, $match);
var_dump($match);
<?php
// 请匹配所有img标签中的src的值
$str = '<img alt="高清无码" id="av" src="av.jpg" />';
$pattern = '/<img.*?src="(.*?)".*?\/?>/i';
preg_match($pattern, $str, $match);
var_dump($match);