Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #7738
| From | TheSaint <nobody@nowhere.net.no> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Composing regex from a list |
| Followup-To | comp.lang.python |
| Date | 2011-06-16 20:48 +0800 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <itcu3f$b1k$1@speranza.aioe.org> (permalink) |
Followups directed to: comp.lang.python
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
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Composing regex from a list TheSaint <nobody@nowhere.net.no> - 2011-06-16 20:48 +0800
Re: Composing regex from a list Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-16 13:09 +0000
Re: Composing regex from a list TheSaint <nobody@nowhere.net.no> - 2011-06-17 19:45 +0800
Re: Composing regex from a list Vlastimil Brom <vlastimil.brom@gmail.com> - 2011-06-16 15:25 +0200
csiph-web