felix winkelmann wrote:
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))'
Well, I'm not assuming csi is available. I look for chicken-static.exe
and then chicken.exe.
Part of my problem was that CMake didn't take \d, it wanted [0-9]+.
But parentheses still don't seem to work. I've bugged the CMake guys
about it, and meanwhile I've worked around the problem by doing a
double regex.
I can now find a previous Chicken installation; next question is what
to do with it.
Cheers,
Brandon Van Every
|