find = re.compile("^(.*)\..*")
for l in lines:
m = re.match(find, l)
print m.group(1)
I want to regex whatever in a string until the first dot.
in [email protected], I want a@b
in [email protected], I want a@b
in [email protected], I want a@b
What my code is giving me...
[email protected]printsa@b[email protected]prints[email protected][email protected]prints[email protected]
what should find be so that it only gets a@b?