Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #87217 > unrolled thread
| Started by | Antoon Pardon <antoon.pardon@rece.vub.ac.be> |
|---|---|
| First post | 2015-03-09 16:39 +0100 |
| Last post | 2015-03-09 16:39 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Letter class in re Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-03-09 16:39 +0100
| From | Antoon Pardon <antoon.pardon@rece.vub.ac.be> |
|---|---|
| Date | 2015-03-09 16:39 +0100 |
| Subject | Re: Letter class in re |
| Message-ID | <mailman.222.1425915597.21433.python-list@python.org> |
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 top | Article view | comp.lang.python
csiph-web