>
> Maybe. In any case it seems to work for the problem at hand, while
> "@.*?@" did not work.
>

    The sequence ".*" does indeed mean "any character, 0 or more times"

    However, following that by "?" is meaningless, since the "?" is
supposed to modify some character spec meaning "the previous character spec
0 or 1 times".  But since there is no character spec present, it is an
improperly formed regular expression.

    Also, while ".*" is greedy, since you have an explicit character at the
end, "@", the expression ".*" will only match everything up to but not
including the last "@" in the string.  Because for an entire expression to
match, every part of it must match.  If ".*" matches the entire rest of the
string, then the "@" will have nothing to match.  So, ".*" stops matching
before the last "@" so that character can explicitly match.  If the
expression was "@.*@?", then the greedy part ".*" would match the rest of
the string, since the final "@" is specified as "0 or more times", and is
satisfied by matching 0 times.

If you are trying to match everything in between two "@" symbols, then you
would have wanted "@.*@"



HTH,

David Elaine Alt
415 . 341 .4954                                           "*Confusion is
highly underrated*"
ela...@flaminghakama.com
self-immolation.info
skype: flaming_hakama
Producer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to