Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #34515

Re: regex walktrough

From rh <richard_hubbe11@lavabit.com>
Subject Re: regex walktrough
Date 2012-12-08 17:07 -0800
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.641.1355015251.29569.python-list@python.org> (permalink)

Show all headers | View raw


On Sun, 09 Dec 2012 00:27:30 +0100
Hans Mulder <hansmu@xs4all.nl> 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':
> 
> >>> 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.

No and also wouldn't want to use \w unless really needed.
So that answers my other question.

> 
> -- HansM


-- 

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


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