Skip to content

Instantly share code, notes, and snippets.

View fmndantas's full-sized avatar
🏠
Working from home

Fernando Dantas fmndantas

🏠
Working from home
View GitHub Profile
@fmndantas
fmndantas / regex_guide.py
Created August 5, 2019 14:49
Simple python guide to regular expressions
import re
def say_if_match(patt, test, id):
if re.match(patt, test):
print('{}: match!'.format(id))
return re.match(patt, test)
# Metacharacters
# '*': zero or more repetitions of previous thing