Why is it different about '\s' Matches whitespace and Equivalent to [\t\n\r\f]?

fl rxjwg98 at gmail.com
Thu Jul 10 15:32:13 CEST 2014


On Thursday, July 10, 2014 7:18:01 AM UTC-4, MRAB wrote:
> On 2014-07-10 11:05, rx at gmail.com wrote:
> 
> It's equivalent to [ \t\n\r\f], i.e. it also includes a space, so
> 
> either the tutorial is wrong, or you didn't look closely enough. :-)
> 
> 
> The string starts with ' ', not '\t'.
> 
> 
> 
> 
> 
> The string starts with ' ', which isn't in the character set.
> 
> 
The '\s' description is on link:

http://www.tutorialspoint.com/python/python_reg_expressions.htm


Could you give me an example to use the equivalent pattern?

Thanks



More information about the Python-list mailing list