Advertisement
Fhernd

coincidencia-busqueda-texto.py

Apr 11th, 2018
2,298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. import re
  2.  
  3. frase = "Python es un lenguaje de programación interpretado."
  4.  
  5. print(frase.find('grama'))
  6.  
  7. cadena_fecha = '11/04/2017'
  8.  
  9. if re.match(r'\d+\d+/\d+', cadena_fecha):
  10.     print('Coincide')
  11. else:
  12.     print('No coincide')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement