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


Groups > comp.lang.python > #33940

Re: Regular expression for different date formats in Python

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 <torriem@gmail.com>
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 <torriem@gmail.com>
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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.292.1353947661.29569.python-list@python.org> (permalink)
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

Show key headers only | View raw


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.

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


Thread

Regular expression for different date formats in Python undesputed.hackerz@gmail.com - 2012-11-26 05:15 -0800
  Re: Regular expression for different date formats in Python Vlastimil Brom <vlastimil.brom@gmail.com> - 2012-11-26 17:30 +0100
  Re: Regular expression for different date formats in Python Michael Torrie <torriem@gmail.com> - 2012-11-26 09:05 -0700
    Re: Regular expression for different date formats in Python Miki Tebeka <miki.tebeka@gmail.com> - 2012-11-26 13:57 -0800
    Re: Regular expression for different date formats in Python Miki Tebeka <miki.tebeka@gmail.com> - 2012-11-26 13:57 -0800

csiph-web