摘要: 1.首先判断有没有括号, if(preg_match("/\([\s\S]*?\)/",$str)){ echo "包含括号"; } 2. 阅读全文
posted @ 2017-01-12 17:50 windy_shyuan 阅读(3782) 评论(1) 推荐(0) 编辑
摘要: 1.首先得把字符串转成utf-8的格式: $str = iconv(charset, 'utf-8', $str);//charset为你的字符原来的格式,包括:gb2312(简体中文),big5(繁体中文),utf8 2.使用preg_match_all进行提取: 阅读全文
posted @ 2017-01-12 17:45 windy_shyuan 阅读(3191) 评论(0) 推荐(0) 编辑