You can use regexp this way:
import re
print(list(filter(lambda x: re.findall(r'_x|^x$',x),l)))
The regexp searches for exact patterns ('_x' or 'x') within each element of the list. applies the func to each element of the iterable.
You can make your expression more genric this way:
print(list(filter(lambda x: re.findall(r'[^A-Za-z]x|^\W*x\W*$',x),l)))
Here am telling python to search for expressions which DON't start with A to Z or a to z but end in x OR search for expressions that start and end with 0 or more non-word characters but have x in between. You can refer this quick cheatsheet on regular expressions https://www.debuggex.com/cheatsheet/regex/python