This is the test link I am using for this project: 
CodePudding user response:
Another way to solve this is to have non capturing groups with ?:
pattern = re.compile(r'http[s]?://[^\s] \.(?:mp3|flac|wav)')
See here.

This is the test link I am using for this project: 
CodePudding user response:
Another way to solve this is to have non capturing groups with ?:
pattern = re.compile(r'http[s]?://[^\s] \.(?:mp3|flac|wav)')
See here.