搜索文档
首页
HTML/CSS
JavaScript
服务端开发
Java教程
移动端
数据库
当前位置:
首页
服务端开发
PHP 教程
PHP 高级教程
源代码
清空
点击运行
<?php $pattern = "/ca[kf]e/"; $text = "He was eating cake in the cafe."; $matches = preg_match_all($pattern, $text, $array); echo $matches . " matches were found."; ?>
运行结果