Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '16,': 0.03; 'output': 0.05; 'string.': 0.05; 'subject:group': 0.05; 'subject:help': 0.08; 'cc:addr:python-list': 0.11; 'python': 0.11; 'subject:expression': 0.16; 'subject:regular': 0.16; 'subject:python': 0.16; 'skip:= 10': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'all,': 0.19; 'import': 0.22; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'script.': 0.24; 'file.': 0.24; 'cc:2**0': 0.24; 'script': 0.25; '>': 0.26; '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; '"': 0.31; 'another': 0.32; 'skip:# 10': 0.33; 'third': 0.33; "can't": 0.35; 'received:google.com': 0.35; 'thanks': 0.36; 'skip:& 10': 0.38; 'pm,': 0.38; 'skip:& 20': 0.39; 'logs': 0.60; 'july': 0.63; 'dear': 0.65; 'here': 0.66; 'groups.': 0.74; 'jul': 0.74; '2013': 0.98 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=pGy9D974ZP0UJI2F4xH3xn2+pylTKk5C4+ettohEaHU=; b=FzpBNx9PMwGs0LPqh5R+/3EL5iOxKgZw1MHqFEu1mmkqB1qcHPdV0eUZHQv2uh/HtX 5j03gt4nOIBdVJvCQWRW8qF004AWaaxfso50kpwr83p5sMkgZ/j9M9+ZSxpo51h8GDf6 bDyZDNxH6hDC2Sb+fahOI5HUerDkd12+d46UmiJ9HnfMGOpuQ6XfJQhuduR3X9ux9d4I dYhCZF9W0GrVOVeG1Nwnz7CTCjHTHGTWAmyT8tgRRHKreQaUdBTG0zRluvDouGEMZrQL KBsk3rxKJTSd3jNC7Jd31a9U52H0zJ+hIDflL7D33dhR/lt3mlTJHQUHr7vdpQD47Zry SLhw== MIME-Version: 1.0 X-Received: by 10.66.254.135 with SMTP id ai7mr1829986pad.185.1373969903975; Tue, 16 Jul 2013 03:18:23 -0700 (PDT) In-Reply-To: References: Date: Tue, 16 Jul 2013 15:48:23 +0530 Subject: Re: help on python regular expression named group From: Mohan L To: Joshua Landau Content-Type: multipart/alternative; boundary=047d7b10cf290f050d04e19e4c2e X-Mailman-Approved-At: Tue, 16 Jul 2013 14:48:50 +0200 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: 143 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1373978931 news.xs4all.nl 15897 [2001:888:2000:d::a6]:49171 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:50744 --047d7b10cf290f050d04e19e4c2e Content-Type: text/plain; charset=ISO-8859-1 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