lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Annotate and Lilyglyphs


From: Flaming Hakama by Elaine
Subject: Re: Annotate and Lilyglyphs
Date: Fri, 6 Feb 2015 17:01:20 -0800

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 "@address@hidden", 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"
address@hidden
self-immolation.info
skype: flaming_hakama
Producer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

reply via email to

[Prev in Thread] Current Thread [Next in Thread]