more elegant way to implement regexp-like quantifiers,"['x', ' ', 'y', None, ' ', 'z']"