Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #87217
| Path | csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <antoon.pardon@rece.vub.ac.be> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.162 |
| X-Spam-Level | * |
| X-Spam-Evidence | '*H*': 0.74; '*S*': 0.07; 'received:134': 0.05; '[1]:': 0.09; '[2]:': 0.09; 'subject:class': 0.16; 'slightly': 0.19; 'tests': 0.22; 'header:User-Agent:1': 0.23; 'header:In- Reply-To:1': 0.27; 'this.': 0.32; 'run': 0.32; 'trouble': 0.34; 'something': 0.35; 'but': 0.35; "i'll": 0.36; 'to:addr:python- list': 0.38; 'to:addr:python.org': 0.39; 'skip:u 10': 0.60; 'more': 0.64; 'different': 0.65; '"one': 0.84; 'nice,': 0.84; 'pardon': 0.84; 'subject:Letter': 0.93 |
| Date | Mon, 09 Mar 2015 16:39:54 +0100 |
| From | Antoon Pardon <antoon.pardon@rece.vub.ac.be> |
| User-Agent | Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.4.0 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: Letter class in re |
| References | <1425908003.40588.YahooMailBasic@web163805.mail.gq1.yahoo.com> |
| In-Reply-To | <1425908003.40588.YahooMailBasic@web163805.mail.gq1.yahoo.com> |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.19 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.222.1425915597.21433.python-list@python.org> (permalink) |
| Lines | 16 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1425915597 news.xs4all.nl 2916 [2001:888:2000:d::a6]:57933 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:87217 |
Show key headers only | View raw
Op 09-03-15 om 14:33 schreef Albert-Jan Roskam:
> I was going to make the same remark, but with a slightly different solution:
> In [1]: repr(re.search("[a-zA-Z]", "é"))
> Out[1]: 'None'
>
> In [2]: repr(re.search(u"[^\d\W_]+", u"é", re.I | re.U))
> Out[2]: '<_sre.SRE_Match object at 0x027CDB10>'
>
> "[^\d\W_]+" means something like "one or more (+) of 'not (a digit, a non-word, an underscore)'.
>
Nice, I am seriously considering this, if only because I have less trouble
understanding this. I'll run some tests to see what gives.
--
Antoon Pardon
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Letter class in re Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-03-09 16:39 +0100
csiph-web