* 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/ #