[Python]Regular Expression Syntax
来源:互联网 发布:sql基础教程光盘 编辑:程序博客网 时间:2024/05/15 23:50
Element Meaning . Matches any character except /n(if DOTALL, also matches /n) ^ Matches start of string(if MULTILINE, also matches after /n) $ Matches end of string(if MULTILINE, also matches before /n) * Matches zero or more cases of the previous RE; greedy(match as many as possible) + Matches one or more cases of the previous RE; greedy(match as many as possible) ? Matches zero or one case of the previous RE; greedy(match one if possible) *?, +?, ?? Nongreedy versions of *, + and ?(match as few as possible) {m,n} Matches m to n cases of the previous RE(greedy) {m,n}? Matches m to n cases of the previous RE(nongreedy) [...] Matches any one of a set of characters contained within the brackets | Matches either preceding expression or following expression (...) Matches the RE within the parentheses and indicates a group (?iLmsux) Alternate way to set optional flags; no errect on match (?:...) Like (...), but does not indicate a group (?P<id>...) Like (...), but the group also gets the name id (?P=id) Matches whatever was previously matched by group named id (?#...) Content of parentheses is just a comment; no effect on match (?=...) Lookahead assertion: matches if RE ... matches what comes next, but does not consume any part of the string (?!...) Negative lookahead assertion: matches if RE ... does not match waht comes next, and does not consume any part of the string (?<=...) Lookbehind assertion: matches if there is a match ending at the current position for RE ... (... must match a fixed length) (?<!...) Negative lookbehind assertion: matches if there is no match ending at the current position for RE ... (... must match a fixed length) /number Matches whatever was previously matched by group numbered number(groups are automatically numbered from 1 to 99) /A
Matches an empty string, but only at the start of the whole string
/b Matches an empty string but only at the start or end of a word(a maximal sequence of alphanumeric characters; see also /w) /B Matches an empty string, but not at the start or end of a word /d Matches one digit, like the set [0-9] /D Matches one non digit, like the set [^0-9] /s Matches a whitespace character, like the set [/t/n/r/f/v] /S Matches a non whitespace character, like the set [^/t/n/r/f/v] /w Matches one alphanumeric character; unless LOCALE or UNICODE is set, /w is like [a-zA-Z0-9_] /W Matches one non alphanumeric character, the reverse of /w /Z Matches an empty string, but only at the end of the whole string // Matches one backslash character- [Python]Regular Expression Syntax
- [Python]Regular Expression Syntax(CHN)
- Regex++, Regular Expression Syntax.
- Regular Expression Syntax
- Regular Expression Syntax
- sed --- Understanding Regular Expression Syntax
- Regular Expression Basic Syntax Reference
- python regular expression
- python regular expression basic
- Python Regular Expression
- Regular Expression Python
- regular expression matching --python
- 正则表达式语法 - Regular Expression Syntax
- Regex - Regular Expression Basic Syntax Reference
- leetcode10 Regular Expression Matching @python
- Perl Regular Expression Syntax Perl的正则表达式语法
- 【LeetCode with Python】 Regular Expression Matching
- Python Regular Expression——简介
- UHCI&OHCI
- SQL SERVER 2005 下载地址
- DBA所需要具备技能
- 引起广播风暴的原因
- Win32 汇编程序开发过程示意图
- [Python]Regular Expression Syntax
- JAVA面试题集
- SQL面试题 (二)
- ACCESS在Web.config里设置连接字符串
- 基于AJAX技术的WebGis系统实践 (4. 三维城市地图系统功能概述)
- 杭州著名公司
- SQLServer_第1章 SQLServer2000简介
- C#中常用的文件操作方法
- perl 消除重复