Re: a newbie regex question

2008-01-25 Thread Max Erickson
"Dotan Cohen" <[EMAIL PROTECTED]> wrote: > Maybe you mean: > for match in re.finditer(r'\([A-Z].+[a-z])\', contents): > Note the last backslash was in the wrong place. The location of the backslash in the orignal reply is correct, it is there to escape the closing paren, which is a special charac

Re: a newbie regex question

2008-01-25 Thread Dotan Cohen
On 24/01/2008, Jonathan Gardner <[EMAIL PROTECTED]> wrote: > On Jan 24, 12:14 pm, Shoryuken <[EMAIL PROTECTED]> wrote: > > Given a regular expression pattern, for example, \([A-Z].+[a-z]\), > > > > print out all strings that match the pattern in a file > > > > Anyone tell me a way to do it? I know

Re: a newbie regex question

2008-01-24 Thread Jonathan Gardner
On Jan 24, 12:14 pm, Shoryuken <[EMAIL PROTECTED]> wrote: > Given a regular expression pattern, for example, \([A-Z].+[a-z]\), > > print out all strings that match the pattern in a file > > Anyone tell me a way to do it? I know it's easy, but i'm completely > new to python > > thanks alot You may

a newbie regex question

2008-01-24 Thread Shoryuken
Given a regular expression pattern, for example, \([A-Z].+[a-z]\), print out all strings that match the pattern in a file Anyone tell me a way to do it? I know it's easy, but i'm completely new to python thanks alot -- http://mail.python.org/mailman/listinfo/python-list