httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Malo ...@perlig.de>
Subject Re: cvs commit: httpd-2.0/build/rpm httpd.init httpd.logrotate httpd.spec.in
Date Sat, 05 Apr 2003 14:40:13 GMT
* Graham Leggett wrote:

> Justin Erenkrantz wrote:
> 
>> patch_sed="/#define.*$3_PATCH_VERSION/s/^.*\([0-9][0-9]*\).*$/\1/p"
> 
> The above substitution, given the string "45-dev", returns "5".
> 
> Changing the substitution to \([0-9][0-9a-z-]*\) returns "5-dev", which
> is still wrong.
> 
> Can anyone tell me why the above would strip the "4" off of the front of
> "45-dev"?

*grin* be careful with aterisks, they are mostly not that what you want :)

/^[^0-9]*\([0-9][0-9]*\).*$/

should do.

nd
-- 
sub the($){+shift} sub answer (){ord q
        [* It is always 42! *]       }
           print the answer
# André Malo # http://pub.perlig.de/ #

Mime
View raw message