码迷,mamicode.com
首页 >  
搜索关键字:matches    ( 597个结果
判断字符串中是否含有中文
/** *判断str中是否含有中文,有则返回true,否则返回false * *@paramstr *@return */ privatebooleanisChineseCharacter(Stringstr){ for(inti=0;i<str.length();i++){ if(str.substring(i,i+1).matches("[\\u4e00-\\u9fbb]+")){ returntrue; } } returnfalse; }
分类:其他好文   时间:2014-09-10 14:19:31    阅读次数:186
Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding element....
分类:其他好文   时间:2014-09-09 18:01:59    阅读次数:146
LeetCode中的动态规划问题(一)
Regular Expression MatchingProblem description:Implement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Ma...
分类:其他好文   时间:2014-09-09 11:37:58    阅读次数:281
JavaScript学习笔记(五)--- String类型
String类型1.字符串的模式匹配方法 1) match(),与RegExp的exec()方法相同,也只接受一个参数,要么是一个正则表达式,要么是一个RegExp对象。var text = "cat,bat,fat,sat";var pattern = /.at/;var matches = t....
分类:编程语言   时间:2014-09-05 21:05:42    阅读次数:200
注册页面的各种判断(正则表达式)
1.密码判断 至少包含数字、字母(区分大小写)、符号中的2种 NSString *regex = @"^(?![A-Z]+$)(?![a-z]+$)(?!\\d+$)(?![\\W_]+$)\\S+$"; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"self matches %@",re...
分类:其他好文   时间:2014-09-04 19:05:50    阅读次数:210
Wildcard Matching
Implement wildcard pattern matching with support for '?' and '*'.'?' Matches any single character.'*' Matches any sequence of characters (including th...
分类:其他好文   时间:2014-09-01 19:34:43    阅读次数:224
UVa 11375 Matches
第一次用lrj的高精度类模板,感觉还是很好用的c[x]表示数字x需要的火柴根数将已经使用的火柴数i看做状态,每添加一个数字x状态就从i转移到i+c[x]d[i]表示从节点0到节点i路径的条数,则答案f(n) = d(1) + d(2) + …… + d(n)开始的时候不计入0,最后的时候如果n≥6答...
分类:其他好文   时间:2014-08-31 18:33:21    阅读次数:205
【POJ】2234 Matches Game(博弈论)
http://poj.org/problem?id=2234博弈论真是博大精深orz首先我们仔细分析很容易分析出来,当只有一堆的时候,先手必胜;两堆并且相同的时候,先手必败,反之必胜。根据博弈论的知识(论文 张一飞:《由感性认识到理性认识——透析一类搏弈游戏的解答过程》)局面可以分解,且结果可以合并...
分类:其他好文   时间:2014-08-27 17:54:48    阅读次数:300
[LeetCode] Regular Expression Matching(递归)
Implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding element....
分类:其他好文   时间:2014-08-26 22:52:26    阅读次数:203
Regular Expression Matching (LeetCode)
Implement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The...
分类:其他好文   时间:2014-08-25 16:20:54    阅读次数:161
597条   上一页 1 ... 53 54 55 56 57 ... 60 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!