[Cmake] case sensitive string matching ?

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


I guess I'm unclear about the definition of what "MATCHES" does. The "^"
and "$" refer to preceding and succeeding end-of-line indicators, which
is relevant if you're searching for some occurrence of the regexp within
some target string, but it wasn't clear to me from the documentation
that that is what "MATCHES" does. I figured it meant to check if the
entire first operand is a member of the language specified by the second
operand. But I probably mis-read that.

-Chris

> -----Original Message-----
> From: Peter Vanroose [mailto:Peter . Vanroose at esat . kuleuven . ac . be]
> Sent: Tuesday, July 01, 2003 11:43 AM
> To: Chris Volpe
> Cc: Bill Hoffman; Jan Woetzel; CMake list
> Subject: RE: [Cmake] case sensitive string matching ?
>=20
> > 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.
>=20
> You mean that "ab" should not match the reg.exp. "^A*$" (notice the ^
and
> $)
> but it matches "^A*" (since it starts with zero A's) and also matches
> "A*$" (since it ends in zero A's).
>=20
>=20
> --	Peter Vanroose.