The join() function allows you to transform a list in a string. The single quote before join is what you will put in the middle of each string on list. When you execute this code part (' '.join(l)) you'll receive this:
'this is just a test'
So you can use the findal() function.
I know i am 7 years late, but i recently create an account because I'm studying and other people could have the same question. I hope this help you and others.
Update After @FélixBrunet comments:
import re
regex = re.compile(r'th.s')
l = ['this', 'is', 'just', 'a', 'test','th','s', 'this is']
matches2=[] #declare a list
for i in range(len(l)): #loop with the iterations = list l lenght. This avoid the first item commented by @Felix
if regex.findall(l[i]) != []: #if the position i is not an empty list do the next line. PS: remember regex.findall() command return a list.
if l[i]== ''.join(regex.findall(l[i])): # If the string of i position of l list = command findall() i position so it'll allow the program do the next line - this avoid the second item commented by @Félix
matches2.append(''.join(regex.findall(l[i]))) #adds in the list just the string in the matches2 list
print(matches2)