Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created April 13, 2018 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/691864ec1ba3cb40602517bf91865522 to your computer and use it in GitHub Desktop.
Save Fhernd/691864ec1ba3cb40602517bf91865522 to your computer and use it in GitHub Desktop.
Búsqueda y reemplazo de texto sin tener en cuenta la capitalización. OrtizOL.
import re
python = "PYTHON, python, Python"
print(re.findall('python', python, flags=re.IGNORECASE))
print(re.sub('python', 'pitón', python, flags=re.IGNORECASE))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment