In general, you may use
import re # Add the re import declaration to use regex
test = ['bbb', 'ccc', 'axx', 'xzz', 'xaa'] # Define a test list
reg = re.compile(r'^x') # Compile the regex
test = list(filter(reg.search, test)) # Create iterator using filter, cast to list
# => ['xzz', 'xaa']
Or, to inverse the results and get all items that do not match the regex:
list(filter(lambda x: not reg.search(x), test))
# >>> ['bbb', 'ccc', 'axx']
See the Python demo.
USAGE NOTE:
re.search finds the first regex match anywhere in a string and returns a match object, otherwise None
re.match looks for a match only at the string start, it does NOT require a full string match. So, re.search(r'^x', text) = re.match(r'x', text)
re.fullmatch only returns a match if the full string matches the pattern, so, re.fullmatch(r'x') = re.match(r'x\Z') = re.search(r'^x\Z').
If you wonder what the r'' prefix means, see Python - Should I be using string prefix r when looking for a period (full stop or .) using regex? and Python regex - r prefix.