最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php ereg()把htm转换成xml文件实现方法
时间:2022-06-24 20:07:10 编辑:袖梨 来源:一聚教程网
php教程 ereg()把htm转换成xml文件实现方法
语法: int ereg(string pattern, string string, array [regs]);
返回值: 整数/数组
$text = "
This is some text here "
".";
ereg("(([^<"]|[^<]*<[^/][^<])*("[^"]*"([^<"]|[^<]*<[^/][^<])*)*)?
", $text, $matches);
echo "Found text: " . $matches[1] . "n";
?>
内容说明
本函数以 pattern 的规则来解析比对字符串 string。比对结果返回的值放在数组参数 regs 之中,regs[0] 内容就是原字符串 string、regs[1] 为第一个合乎规则的字符串、regs[2] 就是第二个合乎规则的字符串,余类推。若省略参数 regs,则只是单纯地比对,找到则返回值为 true。
相关文章
- 《夜族崛起》铁匠西里尔位置一览 05-17
- 《寓言之地》1.02更新内容一览 05-17
- 《辐射4》steam好评率介绍 05-17
- 《夜族崛起》技能强化珠宝掉落说明 05-17
- 《辐射4》主机控制台介绍 05-17
- 《星露谷物语》海草和绿藻获取方法 05-17