This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: expect module


Maciej Stachowiak <mstachow@alum.mit.edu> writes:

> I think it is more natural generally for `$' to match end-of-string,
> as there are other ways to match newlines, and it is useful to match
> end-of-string on strings that contain newlines.

I thought `$' had a very well defined meaning in regular expressions:
matching the empty string at the end of a line.  It seems that giving
it a new interpretation could confuse people.

It seems intuitive that the end of a string is regarded as the end of
a line, but it also seems intuitive that a string containing several
newline characters is regarded as consisting of several lines and,
thus, that $ should match the empty string before each of those
newline characters.