chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] calling all regex gurus


From: Nelson Castillo
Subject: Re: [Chicken-users] calling all regex gurus
Date: Thu, 30 Mar 2006 20:04:50 -0500

> So how do I write a regular expression to rip out the "2" in "Version
> 2," and the "3" in "Build 3" ?  For simplicity this can be 2 different
> regular expressions, it doesn't have to be done in 1 go.  I'm reading
> various regex howtos, but there's a learning curve and if anyone knows
> how to do it off the top of their head, I'd learn faster.  :-)

^Version (\d+), Build (\d+)

$ chicken -version | perl -nwe 'if(/^Version (\d+), Build (\d+)/) {
print "$1 $2\n"}'
2 216

I just noticed I need to update.  If not, I would have said your post
was offtopic :P

--
http://arhuaco.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]