re正则表达式 使用方法: import re def phone_id(phone_number): ret = re.findall("^1[358]\d{9}", phone_number) if ret: print("您输入的手机号是%s" % phone_number) else: pr ...
分类:
编程语言 时间:
2019-04-11 01:22:41
阅读次数:
159
一 . 正则表达式 匹配字符串 二 . 在python中使用正则. re (?P<name>正则) 1. search() 搜索. 搜索到第一个结果返回 2. match() 匹配. 收到一个结果返回. 从头开始匹配 3. findall() 查找所有匹配结果 4. finditer() 返回迭代器 ...
分类:
编程语言 时间:
2019-04-08 21:17:19
阅读次数:
173
''' 正则表达式作用:判断一个字符串是否匹配给定的格式:例如判断用户注册账号是否满足格式,抓取页面链接等。 ''' import re #使用正则表达式需要导入re模块 st = "123456@163.com" st1 = re.findall(r'^[a-zA-Z0-9]+@[a-zA-Z0-... ...
分类:
其他好文 时间:
2019-04-07 15:44:23
阅读次数:
169
雇员实体类 1.ForEach(Action<T> action) 对集合的每个元素执行指定操作 2.FindAll(Predicate<T> match) 检索与指定谓词定义的条件匹配的所有元素 3.Where 基于谓词筛选值序列 4.RemoveAll(Predicate<T> match) 移 ...
1 土肥原贤二 看到页面怀疑是sql注入,写了个4'进去就发生报错。could not to the database You have an error in your SQL syntax; check the manual that corresponds to your MySQL serv ...
分类:
其他好文 时间:
2019-03-31 16:48:28
阅读次数:
161
sqli1: 脚本 1 # -*- coding: utf-8 -*- 2 """ 3 Created on Sat Mar 23 09:37:14 2019 4 5 @author: kenshin 6 """ 7 8 import requests,re 9 url = 'http://loca ...
分类:
数据库 时间:
2019-03-23 16:06:39
阅读次数:
232
re模块 import re 根据正则规则从一段内容中查找结果 findall 从字符串中选出所有能匹配正则表达式规则的内容,以列表的形式返回 ret = re.findall('\d+','alex123yuan234') print(ret) search 在字符串内查找匹配,只找到第一个匹配并 ...
分类:
其他好文 时间:
2019-03-22 18:34:23
阅读次数:
100
原文:用例子看ASP.NET Core Identity是什么? 目录 前言 基于声明的认证(Claims-based Authentication) Claim 在ASP.NET Core Identity中是如何实现的 类ClaimsPrincipal ... ...
分类:
Web程序 时间:
2019-03-14 00:50:47
阅读次数:
255
演示正则表达式的拓展内容:函数:finditer(regex,string,[flags=0]):参数:和match、search、findall一样理解功能:将所有匹配的数据封装为一个一个的match对象,然后以iterator返回 import re str1 = 'i love shangha ...
分类:
编程语言 时间:
2019-03-10 09:37:26
阅读次数:
193
使用正则表达式匹配以 .com 或 .cn 为域名后缀的URL地址 ...
分类:
编程语言 时间:
2019-03-08 20:50:09
阅读次数:
906