Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #48306

Re: Pattern Search Regular Expression

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <andipersti@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.191
X-Spam-Level *
X-Spam-Evidence '*H*': 0.63; '*S*': 0.01; 'andreas': 0.16; 'bye,': 0.16; 'subject:Regular': 0.16; 'url:re': 0.16; 'followed': 0.16; 'wrote:': 0.18; 'text,': 0.24; 'header:In-Reply-To:1': 0.27; 'option.': 0.31; 'url:2008': 0.31; 'regular': 0.32; 'url:python': 0.33; 'basic': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'charset:us-ascii': 0.36; 'url:org': 0.36; 'url:library': 0.38; 'to:addr:python-list': 0.38; 'url:12': 0.39; 'to:addr:python.org': 0.39; 'expression': 0.60; 'url:3': 0.61; 'email addr:gmail.com': 0.63; '(hint:': 0.84; 'end.': 0.84; 'subject:Search': 0.84; 'want:': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; bh=K/IY3A9RNHdNLSkUep/wtI2u05EqD9qEVh9GFQNNSec=; b=A6Aqc4is85HKVyHpX0TS0xaI5za22oik9nlSo10oTek8u0PeipCHKXelboGT7SqolP jYLp19QCBaeHBCwalQuhgEL5zgR67pDSbgNRAh5jvPoEoFYwIXKf26Q8OIcd/NSbn4Ki AdaH1HIbmHrQYgJt2rkeKNP+AcrIBw+RDumLVuO5a02eVyd+j3x4HWtGg3PJKPUAGdil EBzWVoTwsyrwJpkCCDH/DPFBjLkUbZwiRryLggXnmoPFUOXm2QhErvZlPCATPOFtomd9 Tz7hWyh1RbbyZXWxz6fj+AE/BVjzowXkej6r8rdiUYzFaaW8Fqx00kpGh7dRyJYndnPF QIDA==
X-Received by 10.14.7.133 with SMTP id 5mr8454421eep.115.1371308510318; Sat, 15 Jun 2013 08:01:50 -0700 (PDT)
Date Sat, 15 Jun 2013 17:01:47 +0200
From Andreas Perstinger <andipersti@gmail.com>
To python-list@python.org
Subject Re: Pattern Search Regular Expression
In-Reply-To <5200649f-2b2f-4535-8016-a31369e6e348@googlegroups.com>
References <afd6b280-3b64-467b-a2e1-2b36377cd13a@googlegroups.com> <51bc3c4d$0$29997$c3e8da3$5496439d@news.astraweb.com> <kphfdr$su9$8@dont-email.me> <mailman.3371.1371293740.3114.python-list@python.org> <kphqu1$su9$10@dont-email.me> <kphr62$su9$11@dont-email.me> <mailman.3377.1371306538.3114.python-list@python.org> <5200649f-2b2f-4535-8016-a31369e6e348@googlegroups.com>
X-Mailer Claws Mail 3.7.9 (GTK+ 2.24.6; i686-pc-linux-gnu)
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3379.1371308512.3114.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1371308512 news.xs4all.nl 15948 [2001:888:2000:d::a6]:37551
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:48306

Show key headers only | View raw


subhabangalore@gmail.com wrote:
>I know this solution but I want to have Regular Expression option.
>Just learning.

http://mattgemmell.com/2008/12/08/what-have-you-tried/

Just spell out what you want:
A word at the beginning, followed by any text, followed by a word at
the end.
Now look up the basic regex metacharacters and try to come up with a
solution (Hint: you will need groups)

http://docs.python.org/3/howto/regex.html#regex-howto
http://docs.python.org/3/library/re.html#regular-expression-syntax

Bye, Andreas

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Pattern Search Regular Expression subhabangalore@gmail.com - 2013-06-15 02:42 -0700
  Re: Pattern Search Regular Expression Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-15 10:05 +0000
    Re: Pattern Search Regular Expression Denis McMahon <denismfmcmahon@gmail.com> - 2013-06-15 10:24 +0000
      Re: Pattern Search Regular Expression Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-15 11:55 +0100
        Re: Pattern Search Regular Expression rusi <rustompmody@gmail.com> - 2013-06-15 04:28 -0700
        Re: Pattern Search Regular Expression Denis McMahon <denismfmcmahon@gmail.com> - 2013-06-15 13:41 +0000
          Re: Pattern Search Regular Expression Denis McMahon <denismfmcmahon@gmail.com> - 2013-06-15 13:45 +0000
            Re: Pattern Search Regular Expression Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-15 15:28 +0100
              Re: Pattern Search Regular Expression subhabangalore@gmail.com - 2013-06-15 07:31 -0700
                Re: Pattern Search Regular Expression Andreas Perstinger <andipersti@gmail.com> - 2013-06-15 17:01 +0200
                Re: Pattern Search Regular Expression Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-15 16:04 +0100
                Re: Pattern Search Regular Expression subhabangalore@gmail.com - 2013-06-15 09:28 -0700
                Re: Pattern Search Regular Expression Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-15 17:39 +0100
                Re: Pattern Search Regular Expression Terry Reedy <tjreedy@udel.edu> - 2013-06-15 16:24 -0400
  Re: Pattern Search Regular Expression Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-15 11:18 +0100
  Re: Pattern Search Regular Expression rurpy@yahoo.com - 2013-06-15 09:59 -0700
  Re: Pattern Search Regular Expression subhabangalore@gmail.com - 2013-06-15 10:54 -0700
    Re: Pattern Search Regular Expression rurpy@yahoo.com - 2013-06-15 11:47 -0700
      Re: Pattern Search Regular Expression subhabangalore@gmail.com - 2013-06-15 12:38 -0700
      Re: Pattern Search Regular Expression rurpy@yahoo.com - 2013-06-15 13:41 -0700
  Re: Pattern Search Regular Expression Joshua Landau <joshua.landau.ws@gmail.com> - 2013-06-15 22:03 +0100
  Re: Pattern Search Regular Expression Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-15 22:26 +0100

csiph-web