regular expression for integer and decimal numbers
Peter Hansen
peter at engcorp.com
Sat Sep 25 21:54:46 EDT 2004
gary wrote:
> Peter Hansen <peter at engcorp.com> wrote in message news:<pbadnZrDHOinY87cRVn-jg at powergate.ca>...
>>Examples, including the most extreme cases you want to handle,
>>are always a good idea.
>
> Here is an example of what I will be dealing with:
> """
> TOTAL FIRST DOWNS 19 21
> By Rushing 11 6
> By Passing 6 10
> By Penalty 2 5
> THIRD DOWN EFFICIENCY 4-11-36% 6-14-43%
> FOURTH DOWN EFFICIENCY 0-1-0% 0-0-0%
> TOTAL NET YARDS 379 271
> Total Offensive Plays (inc. times thrown passing) 58 63
> Average gain per offensive play 6.5 4.3
> NET YARDS RUSHING 264 115
> """
>
> I can only hope that they were nice and put a leading zero in front of
> numbers less than 1.
Good example of the input. Now all you need to do is tell
us exactly what kind of output you would expect to come
from the routine which you seek. ;-)
-Peter
More information about the Python-list
mailing list