有一阵子没有写博了,还记得当初博客很流行的时候,有一句再流行的语言就是“今天是写博了吗?”,哈哈,现在也不知道是怎么了,天天上班对着电脑,回家以后,就再也不想碰电脑了(更别说是打开电脑了),哈哈,是不是得什么病了?电脑恐惧症?无语。。。。。。
我越来越感叹,现在的WEB技术发展之快,已经越来越往软件形式靠拢了,动不动就是什么组件,插件,模块啦,越是让我越来越晕了,今天一来新浪博客,我一看,哇噻噻,怎么搞得跟海内似的??哈哈,学的吧??不过学得也太像了,连游戏都一样,哈哈,我认为,学习是正常的,但不能拿来主义嘛!!
感到有些压力,对WEB开发人员的要求越来越高,如果不加强学习的话,不出一个月感觉就落伍了,框架哇哇的出,各位高手也太厉害了,发展太快了,快得眼花了,哎~~
半小时精通正则表达式-摘要
(1) ^
'^The': 开头一定要有'The'字符串;
'of despair$':
那么,
'^abc$': 就是要求以abc开头和以abc结尾的字符串,实际上是只有abc匹配
(如果不是理解有误的话,个人认为这句话是错的,不过还没有测试,应该还可以匹配类似'abcadfasdabc'这样的字符串)
'notice': 匹配包含notice的字符串
小结:^
(2) '*', '+',和 '?', 用来表示一个字符可以出现的次数或者顺序. 分别表示:
'zero or more'相当于{0,},
'one or more'相当于{1,},
'zero or one.'相当于{0,1},
这里是一些例子:
'ab*':
'ab+': 和ab{1,}同义,同上条一样,但最少要有一个b存
|
标签:杂谈 |
<td>
<!--<!DOCTYPE html PUBLIC '-//W3C//DTD
XHTML 1.0 Transitional//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta http-equiv='Content-Type' content='text/html;
charset=gb18030' />
<title>无标题文档</title>
</head>
<body>
<table width='963' height='69' border='0' cellpadding='0'
cellspacing='0' bgcolor='#000000'>
</table>
<table width='963' height='402' border='0' cellpadding='0'
cellspacing='0'>

<?php
class Search extends Mysql_Class
{
private dbname;
private searchfiled = array();
private termfiled = array();
private termvalue = array();
public function __construct(dbv,sv,fiv,vv)
{
this->SetPm(dbv,sv,fiv,vv);
}
public function SetPm(v1,v2,v3,v4)
{
self::__set('dbname',v1);
self::__set('searchfiled',v2);
self::__set('termfiled',v3);
self::__set('termvalue',v4);
}
// * 设置属性的值的函数
public function __set(pmname,value)
{
if(isset(value))
{
this->pmname = value;
}
else
{
return null;
}
}
public function
GetSearch(id,emblem='<>',emblemvalue=0,last='ORDER BY subtime
DESC')
{
termfiled = this->termfiled;
termvalue = this->termvalue;
filenum = count(this->termvalue);
if(count(this->termfiled) !=
count(this->termvalue))