[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] calling all regex gurus
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] calling all regex gurus |
Date: |
Fri, 31 Mar 2006 08:21:56 +0200 |
On 3/31/06, Brandon J. Van Every <address@hidden> wrote:
> So, I need to extract the Version and Build numbers from the Chicken
> banner. The banner as given by "chicken -version" is:
>
> $ chicken -version
> ) ___
> (__/_____) /) , /)
> / (/ _ (/_ _ __
> / / )__(_(__/(___(/_/ (_
> (______)
> Version 2, Build 3 - windows-mingw32-x86 - [ dload ptables ]
> (c)2000-2005 Felix L. Winkelmann
>
>
> 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. :-)
>
How about:
% csi -ne '(print (chicken-version))'
cheers,
felix