本节详细讨论和分析一些常见的正则表达式,包括邮编、日期和时间、手机和固定电话、身份证、Email地址、IP地址、URL和中文字符。 ...
分类:
其他好文 时间:
2017-06-22 10:16:33
阅读次数:
264
React.PropTypes声明了一系列的数据类型和校验规则: ...
分类:
其他好文 时间:
2017-06-20 13:43:06
阅读次数:
113
function get_real_ip() { $ip = $_SERVER['REMOTE_ADDR']; if (isset($_SERVER['HTTP_CF_CONNECTING_IP']) && preg_match('/^([0-9]{1,3}\.){3}[0-9]{1,3}$/', ... ...
分类:
Web程序 时间:
2017-06-20 12:24:50
阅读次数:
219
",FILE_APPEND); add_site($file_location,$file); file_put_contents($file,"",FILE_APPEND); } } function add_site($dir,&$file){ if(preg_match('/^[a-z]{1,... ...
分类:
其他好文 时间:
2017-06-20 00:24:54
阅读次数:
247
public static void main(String args[]) throws Exception { Pattern p = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$"); Matcher m = p.m ...
分类:
编程语言 时间:
2017-06-19 18:36:18
阅读次数:
149
字符串是我们编程时经常用的一种数据类型,对于简单的字符串查找,使用字符串的内置方法就可以,对于比较复杂的符串或者内容经常变化的字符串,就要用到正则表达式了。 在Python中要用正则表达式,需要导入re模块,re模块是内置模块,import导入就可使用。 1.匹配字符串的几个方法: 1>match方 ...
分类:
其他好文 时间:
2017-06-19 00:35:34
阅读次数:
206
自定义适配器:productadapter.java Item.xml:mysoinner.xml Activity中的使用: 如果配合spinner来使用: ...
分类:
其他好文 时间:
2017-06-18 21:50:34
阅读次数:
258
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the lo ...
分类:
其他好文 时间:
2017-06-18 18:08:00
阅读次数:
127
No BB!!! show me the code。 Main.js import { BrowserRouter, Route, Link ,Switch} from 'react-router-dom' class AppComponent extends React.Component { < ...
分类:
其他好文 时间:
2017-06-17 19:32:44
阅读次数:
128
jQuery分析(3) - jQuery.fn.init 1.前言 上一篇jQuery分析(2)中了解了jQuery库的骨架实现原理,这就好比摇滚音乐,摇滚音乐不是某种音乐他就像一个音乐盒子,里面包含了各种不同的摇滚风格(山地、朋克、乡村、流行、硬摇、金属、迷幻等)。那么上一篇只是大致了解了jQue ...
分类:
Web程序 时间:
2017-06-17 18:34:32
阅读次数:
388