[Cmake] case sensitive string matching ?

Chris Volpe cvolpe at ara . com
Tue, 1 Jul 2003 12:34:54 -0400


The CMake documentation says that in "def MATCHES def2", it checks to
see if def1 matches the regular expression def2. It doesn't say that it
checks if some sub-string of def1 matches def2. Now, I don't know if
there's a discrepancy between the documentation and the implementation,
but I was under the impression that "<string> MATCHES <regexp>" means to
check if <string> itself (not some substring of <string>) can be
generated by <regexp>. Is that not what "MATCHES" means in this context?
If so, a finite state automaton that implements "A*", or "a*", would
reject "ab" as input.

-Chris

> -----Original Message-----
> From: Bill Hoffman [mailto:bill . hoffman at kitware . com]
> Sent: Tuesday, July 01, 2003 11:30 AM
> To: Chris Volpe; Jan Woetzel; CMake list
> Subject: RE: [Cmake] case sensitive string matching ?
>=20
> The empty string is a sub string of "aa", so there is a match.
>=20
> -Bill
>=20
>=20
> At 11:14 AM 7/1/2003, Chris Volpe wrote:
> >>
> >> So "A*" means, match 0 or more times, and "ab" matches 0 times so,
it
> >is a
> >> match.
> >
> >Something seems wrong with this analysis. "A*" matches zero or more
> >occurrences of "A". This means it matches the following strings: ""
> >(null string), "A", "AA", "AAA", etc. The string "ab" does not match
> >anything in that sequence, therefore it should not match.
> >
> >-Chris
> >_______________________________________________
> >Cmake mailing list
> >Cmake at cmake . org
> >http://www . cmake . org/mailman/listinfo/cmake
>=20
>=20
>=20