js:
文件名操作
<SCRIPT LANGUAGE="JavaScript">
<!--
fname='images/stories/./thumb_bangongjiaju/2004122219309.64.2pf-020.a.gif/fdsf.ds';
re = /(.+\/)([^.]*\.?)(.*)/;
r=re.exec(fname);
//alert(r);
folder = r[1];
basename = r[2];
ext =r[3];
alert("folder="+folder+"\nbname="+basename+"\next="+ext);
//-->
</SCRIPT>
php中文的表达式
$re['gb2312'] = "/[\x01-\x7f]|[\xb0-\xf7][\xa0-\xfe]/";
$re['gbk'] = "/[\x01-\x7f]|[\x81-\xfe][\x40-\xfe]/";
处理css
}([^\r\n])
}\n\1