码迷,mamicode.com
首页 >  
搜索关键字:findall    ( 707个结果
python ==》 模块和正则表达式
今日内容: re 模块 collentions 模块 正则表达式 1.re 模块: re模块下常用的方法: 1 import re 2 #1.re.findall() 3 ret1 = re.findall('a','eva egon yuan') #以 'a' 为眼,找所有。 并且 以列表返回。 ...
分类:编程语言   时间:2017-08-09 00:04:03    阅读次数:223
Python加密篇 正则
hashlib 使用 hashlib.md5() m.update(“sdaf”) hmac hmac.new(“asdf”,”asdfiasd天王盖地虎f”.encode(encoding=”utf-8”));re 模块match() 从头开始search() 查询所有 只匹配一次findall(... ...
分类:编程语言   时间:2017-08-06 23:10:58    阅读次数:181
selenuim-webdriver注解之@FindBy、@FindBys、@FindAll的区别
selenium-webdriver中获取页面元素的方式有很多,使用注解获取页面元素是其中一种途径, 方式有3种:@FindBy、@FindBys、@FindAll。下文对3中类型的区别和使用场景进行介绍 1)@FindBy 2)@FindBys @FindBys 相当于是取交集,是先根据第一个注解 ...
分类:数据库   时间:2017-08-04 19:38:52    阅读次数:151
easyui combobox默认选中项
<script type="text/javascript"> $("#areaCombobox").combobox({ url: "${pageContext.request.contextPath}/areaAction_findAllArea.action", //获取后台动作方法返回的js ...
分类:其他好文   时间:2017-08-03 11:23:50    阅读次数:148
Python删除八天前匹配到的日志
脚本展示:#!/usr/bin/envpython#coding:utf-8importtime,sys,re,os,datetimeDELETE_FILE_DATE=datetime.datetime.now()-datetime.timedelta(days=8)DELETE_FILE_DATE=DELETE_FILE_DATE.strftime(‘%Y%m%d‘)FILE_DIRECTORY=sys.argv[1]FILE_NAME=sys.argv[2]result=re.findall(‘\..
分类:编程语言   时间:2017-07-25 01:01:04    阅读次数:192
Excel导入导出例子
一键上传 在ssh中上传批量数据表格 1.必须同步提交form表单 2.Form表单编码方式:multipart/form-data 3.提交方式必须为post 4.上传文件对应input type="file" 为导入按钮添加一键上传效果: 导入: POI:http://poi.apache.or ...
分类:其他好文   时间:2017-07-23 22:58:29    阅读次数:435
python中,有关正则表达式re函数:compile、match、search、findall
1、全局匹配函数 re.compile(pattern=pattern,re.S).findall(text)函数: compile 函数根据一个模式字符串和可选的标志参数生成一个正则表达式对象。该对象拥有一系列方法用于正则表达式匹配和替换。 2、re.match函数:(从第一字符开始匹配,不匹配则 ...
分类:编程语言   时间:2017-07-23 11:28:34    阅读次数:248
python3的一个简单爬虫
#coding=utf-8 import re import urllib.request def getHtml(url): page = urllib.request.urlopen(url) html = page.read() html = html.decode('UTF-8') retu... ...
分类:编程语言   时间:2017-07-21 18:55:25    阅读次数:127
re match findall research
re.matchimportres=‘23432werwre2342werwrew‘p=r‘(\d*)([a-zA-Z]*)‘m=re.match(p,s)print(m.group())#返回所有匹配内容23432werwreprint(m.group(0))#和group()一样23432werwreprint(m.group(1))#返回字串第一个23432,没有字串则报错print(m.group(2))#返回字串第二个werwrepri..
分类:其他好文   时间:2017-07-14 16:43:02    阅读次数:131
python--正则match_compile_search_findall用法
正则表达式功能很强大,但学精通还是要自己花点时间的。下面讲解下match、compile、search、findall常用的方法Match从字符串的第一个字符开始匹配,如果未匹配到返回None,匹配到则返回一个对象未匹配到返回None开始字符匹配到了h,在返回一个对象,并且需要通过group来获取这..
分类:编程语言   时间:2017-07-13 19:01:37    阅读次数:179
707条   上一页 1 ... 50 51 52 53 54 ... 71 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!