Path: csiph.com!usenet.pasdenom.info!gegeweb.org!newsfeed.kamp.net!newsfeed.kamp.net!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.017 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; '16,': 0.03; 'output': 0.05; 'string.': 0.05; 'subject:group': 0.05; 'subject:help': 0.08; 'python': 0.11; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'message- id:@mrabarnett.plus.com': 0.16; 'subject:expression': 0.16; 'subject:regular': 0.16; 'substring': 0.16; 'subject:python': 0.16; 'skip:= 10': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'all,': 0.19; '(the': 0.22; 'import': 0.22; 'print': 0.22; 'header:User- Agent:1': 0.23; 'lets': 0.24; 'script.': 0.24; 'file.': 0.24; 'script': 0.25; 'appreciated': 0.26; 'asking': 0.27; 'header:In- Reply-To:1': 0.27; 'correct': 0.29; 'skip:( 40': 0.30; "skip:' 10": 0.31; 'that.': 0.31; 'another': 0.32; 'skip:# 10': 0.33; 'third': 0.33; "can't": 0.35; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'remove': 0.60; 'logs': 0.60; "you're": 0.61; 'july': 0.63; 'dear': 0.65; 'here': 0.66; 'header :Reply-To:1': 0.67; 'reply-to:no real name:2**0': 0.71; 'groups.': 0.74; 'jul': 0.74; 'captures': 0.84; 'reply-to:addr:python.org': 0.84; 'substrings': 0.84; 'together,': 0.84; 'capture': 0.91; 'time)': 0.91; '2013': 0.98 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=KrN0hwmN c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=0Bzu9jTXAAAA:8 a=K2DDQYBT4xIA:10 a=bqsVwSV3o_cA:10 a=ihvODaAuJD4A:10 a=OUOv7kDek9cA:10 a=8nJEP1OIZ-IA:10 a=EBOSESyhAAAA:8 a=8AHkEIZyAAAA:8 a=My1DXVzExXUA:10 a=sfeZhN6MAAAA:8 a=pGLkceISAAAA:8 a=7TDE6NsTis3iVeQY1Q4A:9 a=wPNLvfGTeEIA:10 a=MSl-tDqOz04A:10 X-AUTH: mrabarnett:2500 Date: Tue, 16 Jul 2013 16:38:14 +0100 From: MRAB User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: python-list@python.org Subject: Re: help on python regular expression named group References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: python-list@python.org 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: 68 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1373989068 news.xs4all.nl 15888 [2001:888:2000:d::a6]:39735 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:50746 On 16/07/2013 11:18, Mohan L wrote: > > > > On Tue, Jul 16, 2013 at 2:12 PM, Joshua Landau > wrote: > > 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