How to Use Regex in Python?

Photo by Dlanor S on Unsplash

There are hundreds possibly thousands of Regular Expression (Regex for short) cheat sheets and articles trying to articulate what it is and how to write the code for it. Do you know what I found to be a problem when I was learning about regex? It all seemed confusing only because they believed that diving right in with minor explanation on what it is, and how it works. Sometimes, scripts are moderately long and as a new developer seeing a…