Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

README.md

Regex Note

Identifiers

Identifiers Meaning
\ escape character
\d any number
\D anything but a number
\s space
\S anything but a space
\w any letter
\W anything but a letter
\b space around whole words
. any character, except for a new line
\. period

Modifiers

Modifiers Meaning
? match 0 or 1
* match 0 or more
+ match 1 or more
$ match the end of a string
^ match the beginning of a string
| either or
[] range or variance e.g. [A-Z]
{x} expecting x amount
{x, y} expect to see this x-y amounts of the preceding code

White Space Characters

White Space Characters Meaning
\n new line
\s space
\t tab
\e escape
\f form feed
\r carriage return

Note: Don't forget to escape the following characters if used!
. + * ? [ ] $ ^ ( ) { } | \

References

  1. Regular Expressions with re Python Tutorial

About

Regular expressions note

Topics

Resources

Releases

No releases published

Packages

No packages published

Languages