Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #6542
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <bahamutzero8825@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.027 |
| X-Spam-Evidence | '*H*': 0.95; '*S*': 0.00; "shouldn't": 0.07; 'newline': 0.09; '>>>': 0.12; 'am,': 0.14; 'received:209.85.214.174': 0.14; 'received:mail- iw0-f174.google.com': 0.14; 'wrote:': 0.14; 'flag,': 0.16; 'header :In-Reply-To:1': 0.21; "aren't": 0.22; 'subject:problem': 0.22; 'match': 0.26; 'pass': 0.27; 'received:209.85.214': 0.28; 'instead': 0.29; "won't": 0.30; 'whitespace': 0.30; 'supposed': 0.31; "skip:' 10": 0.32; 'steven': 0.32; 'to:addr:python-list': 0.33; 'things': 0.33; 'thinking': 0.34; 'there': 0.35; 'header :User-Agent:1': 0.35; "d'aprano": 0.35; 'message-id:@gmail.com': 0.36; 'considered': 0.36; 'none': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.37; 'think': 0.38; 'but': 0.38; 'subject:: ': 0.38; 'received:192': 0.38; 'unless': 0.39; 'received:209': 0.39; 'got': 0.39; 'subject:with': 0.39; 'to:addr:python.org': 0.39; 'received:192.168.1': 0.40; '09:18': 0.84; 'match?': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=2YPZjpXccUyBj1uxmI8oFJvF7ormU0lhYbFg2U4ohgw=; b=jEeEW8zVP4aJ9QRPDhysz2tUF4h3HJN4M1idkfrmN8SdqVMgJcpDU6k0b3TrLqjx+4 6W5oSZK+F4WgEfO1dEm4/EeOXOZKAGPJ0IUcBbbXs+aIANdpQLTlcPbbDuDeLRiHvYVG ZrQmD2NkVpL2LuinP/ALQZxQppn+wjHqnFUgk= |
| DomainKey-Signature | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=C12O6/UF072QaB2kve7kUFoohlxkkc5gwH3e8lB5C9qnhKWXX+cV7oSo1HAO2wmlkd y0SjzJIptBIh340Sk8J0xrMG/CaqFnIgQoW5UD2aIsfYzLqrVyNI05nwFoJckcG0hTxc SETuAz7wDQ4U8M1xAGvewHdq8uzhglm1CcuJY= |
| Date | Sun, 29 May 2011 09:35:19 -0500 |
| From | Andrew Berg <bahamutzero8825@gmail.com> |
| User-Agent | Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 ThunderBrowse/3.3.5 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: Weird problem matching with REs |
| References | <mailman.2220.1306669538.9059.python-list@python.org> <4de2459b$0$29996$c3e8da3$5496439d@news.astraweb.com> <mailman.2222.1306676482.9059.python-list@python.org> <4de255a8$0$29996$c3e8da3$5496439d@news.astraweb.com> |
| In-Reply-To | <4de255a8$0$29996$c3e8da3$5496439d@news.astraweb.com> |
| X-Enigmail-Version | 1.1.1 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| 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.2223.1306679725.9059.python-list@python.org> (permalink) |
| Lines | 18 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1306679725 news.xs4all.nl 49044 [::ffff:82.94.164.166]:44051 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:6542 |
Show key headers only | View raw
On 2011.05.29 09:18 AM, Steven D'Aprano wrote:
> >> What makes you think it shouldn't match?
> >
> > AFAIK, dots aren't supposed to match carriage returns or any other
> > whitespace characters.
>
> They won't match *newlines* \n unless you pass the DOTALL flag, but they
> do match whitespace:
>
> >>> re.search('abc.efg', '----abc efg----').group()
> 'abc efg'
> >>> re.search('abc.efg', '----abc\refg----').group()
> 'abc\refg'
> >>> re.search('abc.efg', '----abc\nefg----') is None
> True
I got things mixed up there (was thinking whitespace instead of
newlines), but I thought dots aren't supposed to match '\r' (carriage
return). Why is '\r' not considered a newline character?
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Weird problem matching with REs Andrew Berg <bahamutzero8825@gmail.com> - 2011-05-29 06:45 -0500
Re: Weird problem matching with REs Ben Finney <ben+python@benfinney.id.au> - 2011-05-29 23:00 +1000
Re: Weird problem matching with REs Ben Finney <ben+python@benfinney.id.au> - 2011-05-29 23:03 +1000
Re: Weird problem matching with REs Andrew Berg <bahamutzero8825@gmail.com> - 2011-05-29 08:29 -0500
Re: Weird problem matching with REs Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-29 13:09 +0000
Re: Weird problem matching with REs Andrew Berg <bahamutzero8825@gmail.com> - 2011-05-29 08:41 -0500
Re: Weird problem matching with REs Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-29 14:18 +0000
Re: Weird problem matching with REs Andrew Berg <bahamutzero8825@gmail.com> - 2011-05-29 09:35 -0500
Re: Weird problem matching with REs John S <jstrickler@gmail.com> - 2011-05-29 08:48 -0700
Re: Weird problem matching with REs Andrew Berg <bahamutzero8825@gmail.com> - 2011-05-29 11:16 -0500
Re: Weird problem matching with REs John S <jstrickler@gmail.com> - 2011-05-29 09:45 -0700
Re: Weird problem matching with REs Chris Angelico <rosuav@gmail.com> - 2011-05-30 03:57 +1000
Re: Weird problem matching with REs Roy Smith <roy@panix.com> - 2011-05-29 11:19 -0400
Re: Weird problem matching with REs Andrew Berg <bahamutzero8825@gmail.com> - 2011-05-29 10:31 -0500
Re: Weird problem matching with REs Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-05-29 21:06 +0200
csiph-web