Suppose i want to match a Regex for finding the domain address in text. (including the sub domain if any) eg: it should match
abc.xyz.
google.
yahoo.
mail.google.
Snippet:
pattern = '((\s*\w+.\s*)+)'
matches = re.findall(pattern,line)
for m in matches:
..
..
The inner parenthesis will give the m[0] which i don't need and i will only need m[1]. what is the substitution of the inner parenthesis so that i get my result in m[0].
PS: Having extra match groups () is confusing and i want to avoid using them unless i need those particular value.