type
date
slug
category
icon
password
直观全流程的正则表达式教程Interactive Practice and self-check websites RegexOne—Learn Regular Expressions with simple, interactive exercises.生成检查正则表达式Practice01-Matching NumbersPractice02-Matching Phone Numberspractice03-Matching Emailspractice05-Extracting Data FRom URLspractice06-Matching Specific filenamespractice07-Matching Linespractice08-Re ModuleCompile Flag(编译标志)Practical ProjectReference
直观全流程的正则表达式教程
用 Python 和正则表达式抽取文本结构化信息 - 少数派Interactive Practice and self-check websites
RegexOne—Learn Regular Expressions with simple, interactive exercises.

生成检查正则表达式
Practice01-Matching Numbers
Practice02-Matching Phone Numbers

practice03-Matching Emails

practice04-Matching HTML

practice05-Extracting Data FRom URLs

practice06-Matching Specific filenames

practice07-Matching Lines

practice08-

Re Module
- re.search()
For data analysis, the emphasis is the existence of a specified period of characteristics
2. re.match() Validation 从首字母就开始匹配, 和^...$作用类似
Graphical interfere will accept input info and match data stored in the repoistory
3. findall() if succeed ,return list, if not nreturn none
4. finditer() return callable_iterator object if succeed
5. re.split()
re.split(pat,str,maxspliy=0,flag=0)
6. re.sub()
re.sub(pat,repl,string,count=0,flags=0)
7. Compile Regula Expression re.compile(pat,flags=0)

Compile Flag(编译标志)
- Ascll 表和Unicode
2. Case-insensitive
3. 点(.)匹配换行符以外的所有字符
4. 多行模式,任意一行的开始或者结束匹配就行
5. 详细模式,可以以注释的方式写正则表达式,便于阅读
Practical Project
Reference
- Author:felixfixit
- URL:http://www.felixmicrospace.top/9fd9be6e159242718d9ec530c2109d35
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!