正则表达式例子:在一个字符串中查找另一个字符串
正则表达式返回列表 method=post>在>中查找>>第二个字符串可以在第一个字符串的任何位置>第一个字符串以第二个字符串开始>第一个字符串以第二个字符串结束>区分大小写 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 未找到!;}}?>
转自:http://edu.chinaz.com
正则表达式例子:在一个字符串中查找另一个字符串
正则表达式返回列表 method=post>在>中查找>>第二个字符串可以在第一个字符串的任何位置>第一个字符串以第二个字符串开始>第一个字符串以第二个字符串结束>区分大小写 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 未找到!;}}?>
转自:http://edu.chinaz.com
页:
[1]