0> 匹配 (pattern) 匹配pattern并获取这一匹配,所获取的匹配可以从产生的Matches集合得到 1> 集合 [xyz] 字符集合(x/y或z) [a-z] 字符范围 [a-zA-Z] [^xyz] 负值字符集合 (任何字符, 除了xyz) [^a-z] 负值字符范围 [a-d][m ...
分类:
其他好文 时间:
2017-03-03 15:43:03
阅读次数:
236
//根据正则表达式过滤非法的字符串 + (NSString *)filterCharactor:(NSString *)str withRegexString:(NSString *)regexStr { NSError * error = nil; NSRegularExpression * ex ...
分类:
其他好文 时间:
2017-03-01 12:44:00
阅读次数:
123
PHP中的正则表达式函数 在PHP中有两套正则表达式函数库。一套是由PCRE(Perl Compatible Regular Expression)库提供的,基于传统型NFA。PCRE库使用和Perl相同的语法规则实现了正则表达式的模式匹配,其使用以“preg_”为前缀命名的函数。另一套是由POSI ...
分类:
Web程序 时间:
2017-02-27 21:35:44
阅读次数:
232
一、获取地址栏参数的方法获取地址栏参数的方法<scripttype="text/javascript">
(function($){
$.getUrlParam=function(name){
varreg=newRegExp("(^|&)"+name+"=([^&]*)(&|$)");
varr=window.location.search.substr(1).match(reg);
if(r!=null)returnunesc..
分类:
Web程序 时间:
2017-02-27 14:02:09
阅读次数:
200
<?php /** file: page.class.php 完美分页类 Page */ class Page { private $total; //数据表中总记录数 private $listRows; //每页显示行数 private $limit; //SQL语句使用limit从句,限制获取 ...
分类:
Web程序 时间:
2017-02-26 17:34:02
阅读次数:
282
Normally, documents on different pages are able to communicate between each other only if their domains, protocols and ports match up. HTML 5 specific ...
分类:
Web程序 时间:
2017-02-25 23:43:35
阅读次数:
240
match() 方法可在字符串内检索指定的值,或找到一个或多个正则表达式的匹配。 该方法类似 indexOf() 和 lastIndexOf(),但是它返回指定的值,而不是字符串的位置。 ...
分类:
编程语言 时间:
2017-02-24 16:16:59
阅读次数:
152
//浏览器检测(function () { window.sys = {}; var ua = navigator.userAgent.toLowerCase(); var s; (s = ua.match(/msie ([\d.]+)/)) ? sys.ie = s[1] : (s = ua.ma ...
分类:
Web程序 时间:
2017-02-23 20:42:23
阅读次数:
188
字符类 是唯一一个可以直接赋常量的类,加双引号。 包装类 8个基本类型,8个包装类 查找我们需要的方法 时间日期类 传统的必须要有时间和日期 properties类 可以保存 系统相关类 system.in 代表当然系统提供的标准输入流--往往特指控制台输入 用法:new Scnner(system ...
分类:
其他好文 时间:
2017-02-20 23:01:20
阅读次数:
247
代码中已经加入了注释,需要的朋友可以直接参考代码中的注释。下面直接上功能实现的主要代码: 下面是测试代码: 参考资料:http://www.iteye.com/topic/427397这篇文章对断点续传的原理做了较详细的解释。 ...
分类:
编程语言 时间:
2017-02-20 12:55:35
阅读次数:
263