Day names or first 3 characters

Posted by pocoa on Stack Overflow See other posts from Stack Overflow or by pocoa
Published on 2010-06-17T17:00:18Z Indexed on 2010/06/17 17:03 UTC
Read the original article Hit count: 258

Filed under:
|

I want my regex to catch:

monday mon thursday thu ...

So it's possible to write something like this:

(?P<day>monday|mon|thursday|thu ...

But I guess that there should be a more elegant solution.

© Stack Overflow or respective owner

Related posts about python

Related posts about regex