Re: what is \s+ and \S+ means in re.compile?

2005-03-20 Thread Ed Leafe
On Mar 20, 2005, at 9:59 AM, sam wrote:
I was confused by \s+ and \S+ in python.
The second one (\S+) is stand for matching all alphabets except for 
digit and space? How about the first one?
From the docs:
\s
Matches any whitespace character; this is equivalent to the set [ 
\t\n\r\f\v].

 \S
Matches any non-whitespace character; this is equivalent to the set [^ 
\t\n\r\f\v].

 ___/
/
   __/
  /
 /
 Ed Leafe
 http://leafe.com/
 http://dabodev.com/
 Come to PyCon  http://www.python.org/pycon/2005/
--
http://mail.python.org/mailman/listinfo/python-list


what is \s+ and \S+ means in re.compile?

2005-03-20 Thread sam
Hi,
I was confused by \s+ and \S+ in python.
The second one (\S+) is stand for matching all alphabets except for 
digit and space? How about the first one?

Thanks
Sam
--
http://mail.python.org/mailman/listinfo/python-list