工具类:CharUtil package com.etc.util; import java.util.regex.Pattern; public class CharUtil { public static void main(String[] args) { String[] strArr = ... ...
分类:
其他好文 时间:
2017-01-08 10:49:05
阅读次数:
157
1 func isTelNumber(num:NSString)->Bool 2 { 3 var mobile = "^1(3[0-9]|5[0-35-9]|8[025-9])\\d{8}$" 4 var CM = "^1(34[0-8]|(3[5-9]|5[017-9]|8[278])\\d)\\... ...
分类:
移动开发 时间:
2017-01-07 14:06:29
阅读次数:
345
re模块提供方法如compile, search, findall, match和其他的方法。这些函数是使用REGEX语法建立了一个模式来处理文本的。 第一个方法:search. 一个基本的搜索工作原理是这样的: >>> import re >>> mo = re.search(“hello”,”H ...
分类:
其他好文 时间:
2017-01-07 13:59:38
阅读次数:
212
[root@NB ok]# echo chenlin|base64;echo Y2hlbmxpbgo= [root@NB ok]# yum search iotop Loaded plugins: fastestmirror, refresh-packagekit, security Loading... ...
分类:
系统相关 时间:
2017-01-07 10:54:12
阅读次数:
278
密码强度要求: 1、密码长度至少为8个字符 2、至少要有一个大写英文或者小写字母 3、最少包含一个数字 备注:该方法也可以拆成4个if判断,可以针对不同的情况,对注册客户进行提示。 ...
分类:
其他好文 时间:
2017-01-07 00:55:47
阅读次数:
229
function getUrlParam(name){ var reg = new RegExp("(^|&)"+name+"=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if(r != null) ret ...
分类:
其他好文 时间:
2017-01-06 15:28:38
阅读次数:
181
个人学习,仅供参考: layout部分: <?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http: ...
分类:
数据库 时间:
2017-01-06 14:17:29
阅读次数:
288
required : 必须值验证属性 email : 邮箱验证 match : 正则验证 url : 网址 captcha : 验证码 safe : 安全 compare : 比较 default : 默认值 exist : 存在 file : 文件 filter : 滤镜 in : 范围 uniq ...
分类:
其他好文 时间:
2017-01-06 12:31:18
阅读次数:
161
这几天遇到这样一个需求,需要在不同页面之前传递参数,一般我们都是通过URL来传递,如下 然后在新窗口的时候我们再用window.location.search方法获取?后面的参数内容,但是拿到的内容是“?id=123&name=456”这样的形式,我们还需要进行一系列的字符串处理才能拿到我们需要的信 ...
分类:
Web程序 时间:
2017-01-06 01:00:20
阅读次数:
241