Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #82112 > unrolled thread
| Started by | Zachary Ware <zachary.ware+pylist@gmail.com> |
|---|---|
| First post | 2014-12-08 01:11 -0600 |
| Last post | 2014-12-08 01:11 -0600 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Python re.search simple question Zachary Ware <zachary.ware+pylist@gmail.com> - 2014-12-08 01:11 -0600
| From | Zachary Ware <zachary.ware+pylist@gmail.com> |
|---|---|
| Date | 2014-12-08 01:11 -0600 |
| Subject | Re: Python re.search simple question |
| Message-ID | <mailman.16712.1418022726.18130.python-list@python.org> |
On Mon, Dec 8, 2014 at 12:52 AM, Ganesh Pal <ganesh1pal@gmail.com> wrote: > Hi Folks , > > This might seem to be very trivial question but iam breaking my head over > it for a while . > > My understanding is that re.search should search for the match anywhere in > the string . > > > why is re.search failing in the below case ?? > >>>> pattern > 'Token-based migrations cannot be mixed with level-based: [prev 0 , now 1]' Your pattern here contains a character class ([enoprvw 01,]). You'll need to escape the '[' character to make it literal. Hope this helps, -- Zach
Back to top | Article view | comp.lang.python
csiph-web