I'm trying to apply regex to gather data from a file, and I only get empty results. For example, this little test (python3.4.3)
import re
a = 'abcde'
r = re.search('a',a)
print(r.groups())
exit()
Results with empty tuple (()). Clearly, I'm doing something wrong here, but what?
Comment:
What I'm actually trying to do is to interpret expressions such as 0.7*sqrt(2), by finding the value inside the parenthesis.