学习一段python正則表達式了, 对match、search、findall、finditer等函数作一小结 以下以一段网页为例,用python正則表達式作一个范例: strHtml = '''<div> <a href="/user/student/" class="user-t"><img s ...
分类:
编程语言 时间:
2017-07-12 12:14:52
阅读次数:
150
match(pattern,string,flag=0) 匹配成功就返回匹配对象,匹配失败就返回None。 search(pattern,string,flag=0) 在字符串中搜索第一次出现的正则表达式模式,如果匹配成功,就返回匹配对象,匹配失败就返回None。 匹配对象需要调用group() 或 ...
分类:
编程语言 时间:
2017-07-12 01:13:46
阅读次数:
220
正则表达式总结 正则表达式的语法里面分为字符、预定义字符、数量词、边界匹配、逻辑分组、特殊构造,如图: 先介绍Python中支持正则表达式的re模块中的方法,使用什么函数都大同小异,重要的是正则表达式。 比如说邮箱,我们分析它的结构,其是一个前面为字符和数字组成,中间一个@,跟着字符和数字,后面是. ...
分类:
其他好文 时间:
2017-07-12 01:07:47
阅读次数:
255
Public Sub CustomSubTotal() AppSettings On Error GoTo ErrHandler Dim StartTime, UsedTime As Variant StartTime = VBA.Timer 'Input code here Dim i As Lo... ...
分类:
编程语言 时间:
2017-07-11 19:15:34
阅读次数:
203
1.客户端代码 public static void FileMoveInVirtualMachineForCompressor() { var obj = new object(); string ip = "127.0.0.1"; int port = 11000; ... ...
分类:
其他好文 时间:
2017-07-11 16:01:33
阅读次数:
166
从别的地方导入一个项目的时候,经常会遇到eclipse/Myeclipse报Description Resource Path Location Type Java compiler level does not match the version of the installed Java pro... ...
分类:
编程语言 时间:
2017-07-10 23:32:29
阅读次数:
231
linux设备驱动归纳总结(八):2.总线、设备和驱动的关系 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 上一节介绍了总线、设备和驱动函数的注冊,这节着重介绍它们三者的关 ...
分类:
系统相关 时间:
2017-07-10 19:16:48
阅读次数:
203
首先说,主席树太恶心了(树链剖分更 终于把主席树板子背下来了算是 1306 match循环赛 dfs+剪枝 判断最后一场如果为2就剪 1430 小猴打架 n^(n-2)*(n-1)! 1432 function 找规律 printf("%d\n",(n==1)?1:min(k,n-k+1)<<1); ...
分类:
其他好文 时间:
2017-07-09 14:48:33
阅读次数:
140
题意:给定上一个01矩阵,让你变成一个对角全是 1 的矩阵。 析:二分匹配,把行和列看成两个集合,用匈牙利算法就可以解决,主要是在输出解,在比赛时一紧张不知道怎么输出了。 输出应该是要把 match[i] = i 这样的输出,然后再改掉后面那个,真是个大傻逼输出,气死了。。。。。 代码如下: ...
分类:
其他好文 时间:
2017-07-09 10:49:05
阅读次数:
125
// Include standard headers #include #include // Include GLEW #include // Include GLFW #include GLFWwindow* window; // Include GLM #include using name... ...
分类:
其他好文 时间:
2017-07-09 10:41:28
阅读次数:
233