Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'url:pypi': 0.03; 'subject:Python': 0.05; 'beginner': 0.05; 'python': 0.09; 'library': 0.15; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'ported': 0.16; 'subject:Regular': 0.16; 'subject:expression': 0.16; 'wrote:': 0.17; 'module': 0.19; 'fairly': 0.21; 'third-party': 0.23; 'header :In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'regular': 0.27; 'you?': 0.32; 'url:python': 0.32; 'could': 0.32; 'to:addr:python-list': 0.33; 'updated': 0.34; 'received:org': 0.36; 'but': 0.36; 'message-id:@gmail.com': 0.36; 'url:org': 0.36; 'subject:: ': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'header:Received:5': 0.40; 'help': 0.40; 'think': 0.40; 'email addr:gmail.com': 0.63; 'believe': 0.69 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Mon, 26 Nov 2012 09:05:14 -0700 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.11) Gecko/20121115 Thunderbird/10.0.11 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Regular expression for different date formats in Python References: <804a4170-a317-482c-8eca-e76027a0ee85@googlegroups.com> In-Reply-To: <804a4170-a317-482c-8eca-e76027a0ee85@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1353947661 news.xs4all.nl 6967 [2001:888:2000:d::a6]:44028 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:33940 On 11/26/2012 06:15 AM, undesputed.hackerz@gmail.com wrote: > I am a beginner in python and need help with writing a regular > expression for date and time to be fetched from some html documents. Would the "parser" module from the third-party dateutil module work for you? http://pypi.python.org/pypi/python-dateutil http://labix.org/python-dateutil#head-c0e81a473b647dfa787dc11e8c69557ec2c3ecd2 I don't believe the library is updated for Python 3 yet, sadly. But I bet it could be ported fairly easily. I think it's pure python.