[CMake] Help with REGEX expression

Samuel Crow samuel_crow_work at rocketmail.com
Thu Sep 18 14:32:34 EDT 2008


Update:

It looks like what we're trying to do cannot be done with a REGEX as such because the REGEX functions are for pattern-matching only.  To actually cut out numbers from a string will require an external script.

If it is only going to be running on a Mac we have Python or Bash to choose from.  For something lightweight like this, Bash should work better.  The "cut" command should work nicely.

I'll keep you informed of any progress.

--Sam


--- On Thu, 9/18/08, Samuel Crow <samuel_crow_work at rocketmail.com> wrote:

> From: Samuel Crow <samuel_crow_work at rocketmail.com>
> Subject: Re: [CMake] Help with REGEX expression
> To: "Cmake Mailing List" <cmake at cmake.org>, "Mike Jackson" <mike.jackson at bluequartz.net>
> Date: Thursday, September 18, 2008, 6:19 PM
> Hello Mike,
> 
> I'm looking at Page 41 of Mastering CMake 4th edition. 
> I'll try to get this figured out for you, if you like.
> 
> --Sam
> 
> --- On Thu, 9/18/08, Mike Jackson
> <mike.jackson at bluequartz.net> wrote:
> 
> > From: Mike Jackson <mike.jackson at bluequartz.net>
> > Subject: [CMake] Help with REGEX expression
> > To: "Cmake Mailing List"
> <cmake at cmake.org>
> > Date: Thursday, September 18, 2008, 5:53 PM
> > I am trying to parse out the OS Version from the
> following:
> > 
> > 
> > /Developer/SDKs/MacOSX10.5.sdk
> > /Developer/SDKs/MacOSX10.4u.sdk
> > /Developer/SDKs/MacOSX10.3.9.sdk
> > 
> > I only need the 10.5, 10.4 or 10.3 so I can compare it
> > against another  
> > number (10.x or even 11.x).
> > 
> > I have no idea where to start with this. Could anyone
> > suggest  
> > somewhere to start .. (besides a good Regex tutorial..
> )
> > 
> > Thanks
> >   _________________________________________________
> > | Mike Jackson - Principal Software Engineer      |
> > | BlueQuartz Software                             |
> > | mike.jackson at bluequartz.net                     |
> > | www.bluequartz.net                              |
> > ---------------------------------------------------
> > 
> > _______________________________________________
> > CMake mailing list
> > CMake at cmake.org
> > http://www.cmake.org/mailman/listinfo/cmake
> 
> 
>       
> 
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake


      



More information about the CMake mailing list