Skip to content

Instantly share code, notes, and snippets.

@fmasanori
Created March 12, 2018 13:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fmasanori/78b94fffa8481e1ec56a5caad17573dc to your computer and use it in GitHub Desktop.
Save fmasanori/78b94fffa8481e1ec56a5caad17573dc to your computer and use it in GitHub Desktop.
Limpeza de Dados com ER
import re
p = re.compile(r'\d+')
d, m, a = p.findall('09-03-2018')
print (d, m, a)
d, m, a = p.findall('09/03/2018')
print (d, m, a)
a, m, d = p.findall('6(anos) 2(meses) 10(dias)')
print(a, m, d)
a, m, d = p.findall('6a2m10d')
print(a, m, d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment