Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.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.025 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'string.': 0.05; 'lines,': 0.07; 'subject:string': 0.09; 'mode,': 0.16; 'url:re': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'input': 0.22; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'equivalent.': 0.31; 'explained': 0.31; 'multiline': 0.31; 'url:python': 0.33; 'beginning': 0.33; 'at:': 0.34; 'subject:the': 0.34; 'subject: (': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'url:org': 0.36; 'url:library': 0.38; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'subject:. ': 0.67; 'jul': 0.74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Tquet1ucYynB1P2+f3h0g1KGCRtOoxw8z0sMEPqM/Sc=; b=qmcTv4LzAb+K5G0EM14cFJHJlXBPhGQuRe6hMgm5LXkblBc8a4igopYBD/BDw6JS4b N+WliihcwF+dSa2Y7MwKOZ/4WHC7iFRyCR199Ux8DpKosAcy4aq/4r7PL3NjQFrZD+z7 WpuSS6VQ19UOq0oPaWTKIhVA3D08G8ZxyYtEvlxahbNChzxSYObA+lKlj35KH2u6Jcam kalYkJYlR2JYNv2Ky9sZOTOPXaslXlCnQNBIVDo7j0EyvZq2kDohfE0PUgQTqkm2MFqY J3hB+HBpafM2F3JdzjFs2kOUVt62LI+iqO5g0U+ID/reDytjdmEIrTBWhxIOaxXLbkd3 HGrg== X-Received: by 10.70.52.138 with SMTP id t10mr18000122pdo.90.1405009380310; Thu, 10 Jul 2014 09:23:00 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <47595855-295a-43ee-8b4b-98dda4466669@googlegroups.com> References: <47595855-295a-43ee-8b4b-98dda4466669@googlegroups.com> From: Ian Kelly Date: Thu, 10 Jul 2014 10:22:20 -0600 Subject: Re: What does (A ``quote'' is the character used to open the string, i.e. either ' or ".) mean? To: Python Content-Type: text/plain; charset=UTF-8 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: 1405013103 news.xs4all.nl 2938 [2001:888:2000:d::a6]:43044 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:74323 On Thu, Jul 10, 2014 at 9:23 AM, fl wrote: > Is '\A' the same with '^'? > Is '\Z' the same with '$'? The meanings of these are explained at: https://docs.python.org/library/re.html#regular-expression-syntax Outside of multiline mode, they're equivalent. In multiline mode, ^ and $ will also match at the beginning and end of individual lines, while \A and \Z still only match the beginning and end of the input string.