Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #34512
| Date | 2012-12-09 00:56 +0000 |
|---|---|
| From | MRAB <python@mrabarnett.plus.com> |
| Subject | Re: regex walktrough |
| References | <20121208094813.5560b42fb233329a44b05dee@lavabit.com> <50C38224.3040201@mrabarnett.plus.com> <mailman.634.1355005200.29569.python-list@python.org> <50c3cce2$0$6923$e4fe514c@news2.news.xs4all.nl> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.638.1355014599.29569.python-list@python.org> (permalink) |
On 2012-12-08 23:27, Hans Mulder wrote: > On 8/12/12 23:19:40, rh wrote: >> I reduced the expression too. Now I wonder why re.DEBUG doesn't unroll >> category_word. Some other re flag? > > he category word consists of the '_' character and the > characters for which .isalnum() return True. > > On my system there are 102158 characters matching '\w': > That would be because you're using Python 3, where strings are Unicode. >>>> sum(1 for i in range(sys.maxunicode+1) > ... if re.match(r'\w', chr(i))) > 102158 >>>> > > You wouldn't want to see the complete list. > The number of such codepoints depends on which version of Unicode is being supported (Unicode is evolving all the time).
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: regex walktrough rh <richard_hubbe11@lavabit.com> - 2012-12-08 14:19 -0800
Re: regex walktrough Hans Mulder <hansmu@xs4all.nl> - 2012-12-09 00:27 +0100
Re: regex walktrough MRAB <python@mrabarnett.plus.com> - 2012-12-09 00:56 +0000
Re: regex walktrough rh <richard_hubbe11@lavabit.com> - 2012-12-08 17:07 -0800
csiph-web