Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'output': 0.05; 'string.': 0.05; 'subject:group': 0.05; 'subject:help': 0.08; 'cc:addr :python-list': 0.11; 'subject:expression': 0.16; 'subject:regular': 0.16; 'subject:python': 0.16; 'skip:= 10': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'all,': 0.19; 'import': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'cc:2**0': 0.24; 'script': 0.25; 'appreciated': 0.26; 'header:In- Reply-To:1': 0.27; 'correct': 0.29; 'skip:( 40': 0.30; 'message- id:@mail.gmail.com': 0.30; "skip:' 10": 0.31; 'skip:# 10': 0.33; "can't": 0.35; 'received:google.com': 0.35; 'logs': 0.60; 'july': 0.63; 'dear': 0.65; 'to:addr:gmail.com': 0.65; 'here': 0.66; 'groups.': 0.74; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=n470ifAYHkYRwulkfddcS41261L1OslpDc02y7p+bm4=; b=rcvC0Uzl27CH0MprL9JFPiG0BO5BdrW3nZRR3OPayqd4KIbs5yAn+k3Y8ZuenFOIys j6mzvZJA3bgBkoam98JoP9QTlXKZHEG5u9U2jtGb1+EHZXcDGW/BU6MDLzZ7MP3Ptrdi o19higzkLPklaCUDUL8Jbacy0XxDpdUL7ZapMx16hAcwQKsh183SfHTnIE6HCstS5a4Q a1wv/1kgaOJMWlGtHio7drzvriGLoTkUcBD9Tr2sDNffLWPkIzWlm6hIcGrW7DHx/HI1 sVxAv/xC6zwtg/7kXEtaT9tMExA2q85clGrD2u1kZrhCogxNSLtGdxKvi1thss3trCdC heWw== X-Received: by 10.152.121.73 with SMTP id li9mr232181lab.42.1373964216909; Tue, 16 Jul 2013 01:43:36 -0700 (PDT) MIME-Version: 1.0 Sender: joshua.landau.ws@gmail.com In-Reply-To: References: From: Joshua Landau Date: Tue, 16 Jul 2013 09:42:56 +0100 X-Google-Sender-Auth: EhTg8JDlidLXvsHgPhOHhiknM6A Subject: Re: help on python regular expression named group To: Mohan L Content-Type: text/plain; charset=UTF-8 Cc: python-list 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: 44 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1373964225 news.xs4all.nl 15900 [2001:888:2000:d::a6]:34901 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:50735 On 16 July 2013 07:55, Mohan L wrote: > > Dear All, > > Here is my script : > > #!/usr/bin/python > import re > > # A string. > logs = "date=2012-11-28 time=21:14:59" > > # Match with named groups. > m = > re.match("(?P(date=(?P[^\s]+))\s+(time=(?P