import re
names = ['ArrayList', 'LinkedHashMap']
for s in 'al', 'ali', 'arrli', 'li', 'lh', 'lhmap', 'hm':
f = re.compile('\\w*'.join(s), flags=re.I).search
print(f'{s:5}:', list(filter(f, names)))
выхлоп:al : ['ArrayList']
ali : ['ArrayList']
arrli: ['ArrayList']
li : ['ArrayList', 'LinkedHashMap']
lh : ['LinkedHashMap']
lhmap: ['LinkedHashMap']
hm : ['LinkedHashMap']