Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!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.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:files': 0.09; 'subject:How': 0.10; 'cc:addr:python-list': 0.11; 'jan': 0.12; 'missed': 0.12; '"."': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'simpler,': 0.16; 'subject:remove': 0.16; ':-)': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; "i've": 0.25; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'obscure': 0.31; 'file': 0.32; 'another': 0.32; 'fri,': 0.33; 'received:google.com': 0.35; 'pm,': 0.38; 'anything': 0.39; 'delete': 0.39; "you're": 0.61; 'sound': 0.68; '2015': 0.84; 'to:none': 0.92 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:cc :content-type:content-transfer-encoding; bh=ioDPdjFnZKEgZCgzgaZxCrjvpn71qKyvJmcQh9OkIZY=; b=c6GF1WJMMQ6SCuA2fEVOW5I/fSEaZQx3JEs9Cmp03j8g0dxJmmics4mPfKpoOCvbI2 lD0JXOMLKs6eYg9RV2aYjxvARJ6Lxr92pb+eP+z81AscRHjHur7d+dF0MM9sYOLVaijX fZNM9TxqqRKLUs52+w5h3NVXvBs3M/27Y9/6qR/KDvXrEEkbNVDKI4KVfHZ/Ard6NP4g pqsqaWuVntDnWegYiOlJ9Kq9VGOgjgdWZtgzgI8n5hOleAfJT+2IgBV5GgFGXrvFEix8 JRBcn8Vm59K1rhCaJWHKzMOqWV+nGyMoCCrdt8YkpwFunrmfvkjo6VqYi8ZYQjYuadOW 95hA== MIME-Version: 1.0 X-Received: by 10.107.134.39 with SMTP id i39mr67058838iod.53.1420203557902; Fri, 02 Jan 2015 04:59:17 -0800 (PST) In-Reply-To: <20150102123604.GB24295@arxnet.hu> References: <20150102090051.GC22372@arxnet.hu> <20150102102153.GA89926@cskk.homeip.net> <20150102053552.6ed449b8@bigbox.christie.dr> <20150102123604.GB24295@arxnet.hu> Date: Fri, 2 Jan 2015 23:59:17 +1100 Subject: Re: How do I remove/unlink wildcarded files From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1420203560 news.xs4all.nl 2846 [2001:888:2000:d::a6]:44290 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:83115 On Fri, Jan 2, 2015 at 11:36 PM, Ervin Heged=C3=BCs wro= te: >> And worse, the given re would delete a file named "uni" which doesn't >> sound ANYTHING like what the OP wanted :-) > > yes, you're right - I've missed out a "." before the "*". :) Another reason to avoid regexps when you don't actually need them. Globs are simpler, and have fewer obscure failure modes. ChrisA