Changes
Jump to navigation
Jump to search
← Older edit
Python: Regex
(edit)
Revision as of 13:45, 12 February 2020
447 bytes added
,
13:45, 12 February 2020
m
→All
Line 1:
Line 1:
−
== Quick Reference ==
+
==Quick Reference==
−
=== All ===
+
===All===
{| class="wikitable"
{| class="wikitable"
|+
|+
+
https://regex101.com/
!Token
!Token
!Description
!Description
|-
|-
+
|Newline
|\n
|\n
−
|Newline
|-
|-
+
|Carriage return
|\r
|\r
−
|Carriage return
|-
|-
+
|Null character
|\0
|\0
−
|Null character
|-
|-
|A single character of: a, b, or c
|A single character of: a, b, or c
Line 70:
Line 71:
|\
|\
|-
|-
−
|Capture everything enclosed
+
|Capture everything enclosed
|(...)
|(...)
|-
|-
Line 136:
Line 137:
|\A
|\A
|-
|-
−
|End of string
+
|End of string
|\Z
|\Z
|-
|-
Line 174:
Line 175:
|Complete match contents
|Complete match contents
|\g<0>
|\g<0>
+
|-
+
|Complete match contents
+
|\0
+
|-
+
|Contents in capture group 1
+
|\1
+
|-
+
|Contents in capture group 1
+
|$1
+
|-
+
|Contents in capture group `foo`
+
|${foo}
+
|-
+
|Hexadecimal replacement values
+
|\x20
+
|-
+
|Hexadecimal replacement values
+
|\x{06fa}
+
|-
+
|Tab
+
|\t
+
|-
+
|Carriage return
+
|\r
+
|-
+
|Newline
+
|\n
+
|-
+
|Form-feed
+
|\f
+
|-
+
|Uppercase Transformation
+
|\U
+
|-
+
|Lowercase Transformation
+
|\L
+
|-
+
|Terminate any Transformation
+
|\E
+
|-
+
|3 or more of a
+
|a{3,}
|}
|}
−
== Examples ==
+
==Examples==
===Port===
===Port===
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version