PHP头条
热点:

正则表达式例子在一个字符串中查找另一个字符串




正则表达式

返回列表

if(isset($string) and isset($query) and $string<>"" and $query<>""){
if(isset($case)){
$func = "ereg";
}
else{


$func = "eregi";
}
switch($where){
case "^":
$query = "^" . $query;
break;
case "$":
$query .= "$";
break;
}
eval("$found = $func("$query","$string");");
if($found){
echo "找到!";
}
else{
echo "未找到!";
}
}
?>

www.phpzy.comtrue/phprm/37682.htmlTechArticle正则表达式例子在一个字符串中查找另一个字符串 正则表达式 返回列表 if(isset($string) and isset($query) and $string "" and $query ""){ if(isset($case)){ $func = "ereg"; } else{ $func = "eregi"; } switch($where){...

相关文章

    暂无相关文章

PHP之友评论

今天推荐