Quite new to regular expressions and am trying to get a grasp on them
string = "regex_learning.test"
subbed = re.sub(r'(.*)_learning(.*), r'\1', string)
What I was hoping for is "regex.test" as an ouput when printing subbed, however I just get "regex"
Could someone explain why I am losing the .test?
Thanks in advance