On Thu, 25 Jan 2007, Jacob Abraham wrote:
>I would like to thank you for the solution and
> the helper funtion that I have written is as follows.
That's very similar to a solution I coded up for a friend, who was doing
searches in genetic sequences, and had exactly the same problem you did
Jacob Abraham wrote:
> Hi Danny Yoo,
>
>I would like to thank you for the solution and
> the helper funtion that I have written is as follows. But I do hope
> that future versions of Python include a regular expression syntax to
> handle such cases simply because this method seems very process
Hi Danny Yoo,
I would like to thank you for the solution and
the helper funtion that I have written is as follows. But I do hope
that future versions of Python include a regular expression syntax to
handle such cases simply because this method seems very process and
memory intensive. I also not
>
> def searchall(expr, text, fall_back_len=0):
> [snip]
>
> text = text[end-fallbacklen:]
oops, those look like two different variables to me.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
searchall("abca", "abcabcabca", 1):
print match.group()
Thanks Again.
Jacob Abraham
- Original Message
From: Danny Yoo <[EMAIL PROTECTED]>
To: Jacob Abraham <[EMAIL PROTECTED]>
Cc: python
Sent: Thursday, January 25, 2007 12:14:31 PM
Subject: Re:
On Wed, 24 Jan 2007, Jacob Abraham wrote:
import re
re.findall("abca", "abcabcabca")
> ["abca", "abca"]
>
> While I am expecting.
>
> ["abca", "abca", "abca"]
Hi Jacob,
Just to make sure: do you understand, though, why findall() won't give you
the results you want? The documentati
Dear Tutors,
I'm having a little trouble while using the re module.
eg
>>> import re
>>> re.findall("abca", "abcabcabca")
["abca", "abca"]
While I am expecting.
["abca", "abca", "abca"]
How do I modify my regular expression to do the same.
Thanks for the help.
Regards,
Jacob Abraham