Created
January 8, 2021 14:39
-
-
Save ayubmetah/065db3d426f4e9dfad796fe424a4a8f7 to your computer and use it in GitHub Desktop.
Python Regular Expression Quick Guide
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python Regular Expression Quick Guide | |
^ Matches the beginning of a line | |
$ Matches the end of the line | |
. Matches any character | |
\s Matches whitespace | |
\S Matches any non-whitespace character | |
* Repeats a character zero or more times | |
*? Repeats a character zero or more times | |
(non-greedy) | |
+ Repeats a character one or more times | |
+? Repeats a character one or more times | |
(non-greedy) | |
[aeiou] Matches a single character in the listed set | |
[^XYZ] Matches a single character not in the listed set | |
[a-z0-9] The set of characters can include a range | |
( Indicates where string extraction is to start | |
) Indicates where string extraction is to end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment