Composing regex from a list

TheSaint nobody at nowhere.net.no
Thu Jun 16 08:48:46 EDT 2011


Hello,
Is it possible to compile a regex by supplying a list?

lst= ['good', 'brilliant'. 'solid']

re.compile(r'^'(any_of_lst))

without to go into a *for* cicle?

-- 
goto /dev/null



More information about the Python-list mailing list