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


Groups > comp.lang.python > #41025

Re: Regular expression problem

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.039
X-Spam-Evidence '*H*': 0.92; '*S*': 0.00; '(python': 0.05; 'finished': 0.15; 'exceed.': 0.16; 'expression.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'stdin': 0.16; 'subject:Regular': 0.16; 'subject:expression': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'trying': 0.21; 'subject:problem': 0.22; 'tried': 0.25; 'header:In-Reply-To:1': 0.25; 'wrote': 0.26; 'am,': 0.27; '2.6': 0.27; 'message- id:@mail.gmail.com': 0.27; 'regular': 0.27; 'run': 0.28; 'code': 0.31; 'could': 0.32; 'getting': 0.33; '11,': 0.33; 'to:addr :python-list': 0.33; 'received:google.com': 0.34; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'test': 0.36; 'received:209': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'sure': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'your': 0.60; 'solve': 0.62; 'limit': 0.65; '2013': 0.84; 'limit?': 0.84; 'windows)': 0.84; 'faster.': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=TXid8Z2Cf7DJTTKNSSHAzYqFT8xRR0NN00P7oxoKwTo=; b=u35rBwluUi79DZuEPzaTfN3gqqlxBy5FfE0FbyPeAuJNPpUOi9mztobBbeqnYAvRtr PNLe6f8MwO2nKMzI+vWqEvy9NEmDnWK3gqsIy1d8Rz/9VJTJfGs1KO/m01jNWM8LmdEY qz96uZ7KsR2fV+RUHs+2vfGmfdPvJc3NpVXBMnpfJaJ1eOudbbaJQs2s6ZuPC1OpUc79 ujrh9URMiy8oFwwO8iBA20ETNd0oDFgRA22i0JdLQZxilIcbDsutPC/CEFqOQYG2uVZw mhRmlFhRZ+nW+Ww5vMbLUuZtrAmujmFm8q6flf9hF36zlHgyAc81DwTYvepYmB4Xapfp qXZg==
MIME-Version 1.0
X-Received by 10.52.22.194 with SMTP id g2mr3264068vdf.91.1362938399171; Sun, 10 Mar 2013 10:59:59 -0700 (PDT)
In-Reply-To <c24ab822-a3f4-4faf-8a6d-2e1fde6552ae@googlegroups.com>
References <c24ab822-a3f4-4faf-8a6d-2e1fde6552ae@googlegroups.com>
Date Mon, 11 Mar 2013 04:59:59 +1100
Subject Re: Regular expression problem
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
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.3158.1362938407.2939.python-list@python.org> (permalink)
Lines 9
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1362938407 news.xs4all.nl 6975 [2001:888:2000:d::a6]:44506
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:41025

Show key headers only | View raw


On Mon, Mar 11, 2013 at 4:42 AM, mukesh tiwari
<mukeshtiwari.iiitm@gmail.com> wrote:
> I am trying to solve this problem[1] using regular expression. I wrote this code but I am getting time limit exceed. Could some one please tell me how to make this code run faster.

What is the time limit? I just tried it (Python 2.6 under Windows) and
it finished in a humanly-immeasurable amount of time. Are you sure
that STDIN (eg raw_input()) is where your test data is coming from?

ChrisA

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


Thread

Regular expression problem mukesh tiwari <mukeshtiwari.iiitm@gmail.com> - 2013-03-10 10:42 -0700
  Re: Regular expression problem Chris Angelico <rosuav@gmail.com> - 2013-03-11 04:59 +1100
    Re: Regular expression problem mukesh tiwari <mukeshtiwari.iiitm@gmail.com> - 2013-03-10 11:05 -0700
    Re: Regular expression problem mukesh tiwari <mukeshtiwari.iiitm@gmail.com> - 2013-03-10 11:05 -0700
  Re: Regular expression problem Chris Angelico <rosuav@gmail.com> - 2013-03-11 05:08 +1100
    Re: Regular expression problem mukesh tiwari <mukeshtiwari.iiitm@gmail.com> - 2013-03-10 11:48 -0700
      Re: Regular expression problem Chris Angelico <rosuav@gmail.com> - 2013-03-11 05:57 +1100
    Re: Regular expression problem mukesh tiwari <mukeshtiwari.iiitm@gmail.com> - 2013-03-10 11:48 -0700
  Re: Regular expression problem Terry Reedy <tjreedy@udel.edu> - 2013-03-10 22:06 -0400
    Re: Regular expression problem jmfauth <wxjmfauth@gmail.com> - 2013-03-11 02:28 -0700
      Re: Regular expression problem Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-03-11 10:19 +0000
      Re: Regular expression problem rusi <rustompmody@gmail.com> - 2013-03-11 06:18 -0700
      On topic, please [Was:Re: Regular expression problem] Ned Deily <nad@acm.org> - 2013-03-11 11:13 -0700
  Re: Regular expression problem Serhiy Storchaka <storchaka@gmail.com> - 2013-03-11 20:30 +0200
  Re: Regular expression problem Terry Reedy <tjreedy@udel.edu> - 2013-03-11 16:23 -0400

csiph-web