Re: Concerning Regular Expressions

2006-01-29 Thread Alex Martelli
Tempo <[EMAIL PROTECTED]> wrote: > You are right that my move towards regular expressions was way > premature, but also this post may too turn out to be a little > premature. I guessed and checked myself a way to accomplish what I > needed and I will include it in this post. But first Alex (doesn'

Re: Concerning Regular Expressions

2006-01-29 Thread Tempo
You are right that my move towards regular expressions was way premature, but also this post may too turn out to be a little premature. I guessed and checked myself a way to accomplish what I needed and I will include it in this post. But first Alex (doesn't have to be Alex) could you tell me if yo

Re: Concerning Regular Expressions

2006-01-29 Thread Terry Reedy
"Tempo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Whoops. I've got another tid-bit to tack onto this post. What kind of > value does this expression return: > > re.sub(r'^R0 -', line) > > > Does it return a '1' if successful and a '0' if not successful? Start up an interactiv

Re: Concerning Regular Expressions

2006-01-29 Thread Alex Martelli
Tempo <[EMAIL PROTECTED]> wrote: > I've been reading a bunch of articles and tutorials on the net, but I > cannot quite get ahold of the whole regular expression process. I have > a list that contains about thirty strings, each in its own spot in the > list. What I want to do is search the list, s

Re: Concerning Regular Expressions

2006-01-29 Thread Tempo
Whoops. I've got another tid-bit to tack onto this post. What kind of value does this expression return: re.sub(r'^R0 -', line) Does it return a '1' if successful and a '0' if not successful? -- http://mail.python.org/mailman/listinfo/python-list

Concerning Regular Expressions

2006-01-29 Thread Tempo
I've been reading a bunch of articles and tutorials on the net, but I cannot quite get ahold of the whole regular expression process. I have a list that contains about thirty strings, each in its own spot in the list. What I want to do is search the list, say it's called 'lines', for 'R0 -'. Thank