Skip to content

Instantly share code, notes, and snippets.

@lealhugui
Last active December 7, 2015 20:28
Show Gist options
  • Save lealhugui/e7428c058142b86bb9db to your computer and use it in GitHub Desktop.
Save lealhugui/e7428c058142b86bb9db to your computer and use it in GitHub Desktop.
Encontrar os numeros em conjunto com a sigla MOL na string.
import re
regexp = re.compile('=([0-9]*)mol=')
txt = 'wDARL=1234mol=1000Lamo.1000.dat'
search = regexp.search(txt)
results = search.groups()
if len(results)>0:
print(results[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment