Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail From: Tim Chase Newsgroups: comp.lang.python Subject: Re: Regular expressions Date: Tue, 3 Nov 2015 05:53:39 -0600 Lines: 22 Message-ID: References: <662g3blobme52hfoududj27err185v2npm@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 56F+WO343VAqbAH4DrzkcwDlqAfOUTGL6U1W7zOAzY+Q== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.019 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'python': 0.10; '-tkc': 0.16; '>on': 0.16; 'ah,': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:Regular': 0.16; 'subject:expressions': 0.16; 'wrote:': 0.16; '2015': 0.20; 'trying': 0.22; 'tim': 0.24; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'regular': 0.29; 'chase': 0.29; 'nov': 0.35; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'thanks': 0.37; 'charset:us-ascii': 0.37; 'end': 0.39; 'to:addr:python.org': 0.40; 'different': 0.63; 'asterisk': 0.84; 'received:23': 0.84; 'seymore4head': 0.84 X-Sender-Id: wwwh|x-authuser|tim@thechases.com X-Sender-Id: wwwh|x-authuser|tim@thechases.com X-MC-Relay: Neutral X-MailChannels-SenderId: wwwh|x-authuser|tim@thechases.com X-MailChannels-Auth-Id: wwwh X-MC-Loop-Signature: 1446551700107:1041253315 X-MC-Ingress-Time: 1446551700107 In-Reply-To: X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) X-AuthUser: tim@thechases.com X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:98158 On 2015-11-02 22:17, Seymore4Head wrote: > On Mon, 2 Nov 2015 20:42:37 -0600, Tim Chase > wrote: > > >On 2015-11-02 20:09, Seymore4Head wrote: > >> How do I make a regular expression that returns true if the end > >> of the line is an asterisk > > > >Why use a regular expression? > > > Because that is the part of Python I am trying to learn at the > moment. Thanks Ah, well that's an entirely different problem-space, so then you would want to use MRAB's answer r = re.compile(r"\*$") -tkc