Re: [Tutor] Regular expression error

2005-07-28 Thread Bernard Lebel
On 7/28/05, Kent Johnson <[EMAIL PROTECTED]> wrote: > This will match a string of digits followed by any non-digit, is that what > you want? If you want to restrict it to digits followed by a letter you > should use > r"(\d+|\d+[a-z])" > > Also this will match something like 123A456B, if you w

Re: [Tutor] Regular expression error

2005-07-28 Thread Kent Johnson
Bernard Lebel wrote: > Hello, > > I'm using regular expressions to check if arguments of a function are > valid. When I run the code below, I get an error. > > Basically, what the regular expression "should" expect is either an > integer, or an integer followed by a letter (string). I convert the

[Tutor] Regular expression error

2005-07-28 Thread Bernard Lebel
Hello, I'm using regular expressions to check if arguments of a function are valid. When I run the code below, I get an error. Basically, what the regular expression "should" expect is either an integer, or an integer followed by a letter (string). I convert the tested argument to a string to mak