Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:Python': 0.06; 'failing': 0.07; 'string': 0.09; 'escape': 0.09; 'mixed': 0.09; 'subject:question': 0.10; 'cc:addr:python-list': 0.11; 'literal.': 0.16; 'subject:simple': 0.16; 'folks': 0.16; 'wrote:': 0.18; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; 'guys': 0.24; 'mon,': 0.24; 'question': 0.24; 'cc:2**0': 0.24; '>': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'character': 0.29; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; '>>>>': 0.31; 'breaking': 0.31; 'trivial': 0.31; 'class': 0.32; 'anywhere': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'thanks': 0.36; 'should': 0.36; 'skip:& 10': 0.38; 'thank': 0.38; 'issue': 0.38; 'pm,': 0.38; 'skip:u 10': 0.60; 'hope': 0.61; "you'll": 0.62; 'to:addr:gmail.com': 0.65; 'here': 0.66; 'ware': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=WNjA6SiM31aPQXu1AE/lZ8ySGifbe3i7Oj9PsbxdVsg=; b=AcReZw603kEwSwgxuKcIGKxWpW1sYGKGR68X+YXyNG9lMbxMrEsL6juYt/J7+Pd33L sx1+lteDrlQN4N/SFfkVPq8OHx+IKlVA1V2n67nW14DPfPXT7pz9xHd7PImZfFjY1mG7 tK5wgqi2PrzqXcbVKesCwqOkXLOEvdf03uY62i1MGwnXQEXQM7HkCyh3UVr0bgkD6zuU KUnzctCjdrRKHzJbqkXUuDVOsvGkshy7RhngAQetH4GmWENM734lywAPTrIzcCbG2Ccz YSvRhsIlkFzJwEKV9GDo1mVwfRpkszcBvD9tWbrAFNwW5NbUR3lIJt0A4+iAVchz6grw SUSQ== MIME-Version: 1.0 X-Received: by 10.152.45.41 with SMTP id j9mr15165328lam.59.1418023064346; Sun, 07 Dec 2014 23:17:44 -0800 (PST) In-Reply-To: References: Date: Mon, 8 Dec 2014 12:47:44 +0530 Subject: Re: Python re.search simple question From: Ganesh Pal To: Zachary Ware Content-Type: multipart/alternative; boundary=001a11c29bca08a6ba0509af3903 Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 79 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1418023071 news.xs4all.nl 2951 [2001:888:2000:d::a6]:58262 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:82114 --001a11c29bca08a6ba0509af3903 Content-Type: text/plain; charset=UTF-8 Thanks guys , I escaped the '[' character and my issue is sloved .. Thank you guys u all rock :) Regards, Ganesh On Mon, Dec 8, 2014 at 12:41 PM, Zachary Ware wrote: > On Mon, Dec 8, 2014 at 12:52 AM, Ganesh Pal 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 > --001a11c29bca08a6ba0509af3903 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks guys , I escaped the '[' character and my i= ssue is sloved ..=C2=A0 Thank you guys u all rock :)

Reg= ards,
Ganesh

On Mon, Dec 8, 2014 at 12:41 PM, Zachary Ware <zachary.ware+pylist@gmail.com> wrote:
On Mon, Dec 8, 2014 at 12:52 AM, Ganesh Pal = <ganesh1pal@gmail.com> wr= ote:
> Hi Folks ,
>
> This=C2=A0 might seem to be very trivial question but iam breaking my = head over
> it for a while .
>
>=C2=A0 My understanding is that re.search should search for the match a= nywhere in
> the string .
>
>
> why is re.search failing in the below case=C2=A0 ??
>
>>>> pattern
> 'Token-based migrations cannot be mixed with level-based: [prev 0 = , now 1]'

Your pattern here contains a character class ([enoprvw 01,]).=C2=A0 = You'll
need to escape the '[' character to make it literal.

Hope this helps,
--
Zach

--001a11c29bca08a6ba0509af3903--