Re: Regexp Functions

2020-06-20 Thread Freeman Gilmore
On Tue, Jun 16, 2020 at 4:41 AM Aaron Hill wrote: > > On 2020-06-15 11:16 pm, Freeman Gilmore wrote: > > "y" could represent one of my accidentals, "-y" inverted. "-ax3" , > > one of my accidentals , > > "-a" used 3 times; like a flag, but needs to be inverted to "-x3". > > "+rx2" needs a space

Re: Regexp Functions

2020-06-16 Thread Freeman Gilmore
On Tue, Jun 16, 2020 at 4:41 AM Aaron Hill wrote: > > On 2020-06-15 11:16 pm, Freeman Gilmore wrote: > > "y" could represent one of my accidentals, "-y" inverted. "-ax3" , > > one of my accidentals , > > "-a" used 3 times; like a flag, but needs to be inverted to "-x3". > > "+rx2" needs a space

Re: Regexp Functions

2020-06-16 Thread Aaron Hill
On 2020-06-15 11:16 pm, Freeman Gilmore wrote: "y" could represent one of my accidentals, "-y" inverted. "-ax3" , one of my accidentals , "-a" used 3 times; like a flag, but needs to be inverted to "-x3". "+rx2" needs a space like "+r x2". "t" standard accidental. All "+" removed. "-y -ax3

Re: Regexp Functions

2020-06-15 Thread Freeman Gilmore
On Mon, Jun 15, 2020 at 10:32 PM Aaron Hill wrote: > > On 2020-06-15 5:57 pm, Freeman Gilmore wrote: > > Thank you Aaron. : > > > > In order to ask my question, not knowing how to ask, I simplified it > > too much. The one or both of the first two below may work but i do > > not know how to ap

Re: Regexp Functions

2020-06-15 Thread Aaron Hill
On 2020-06-15 5:57 pm, Freeman Gilmore wrote: Thank you Aaron. : In order to ask my question, not knowing how to ask, I simplified it too much. The one or both of the first two below may work but i do not know how to apply them. This is a meta problem I have often struggled with. While tr

Re: Regexp Functions

2020-06-15 Thread Freeman Gilmore
Thank you Aaron. : In order to ask my question, not knowing how to ask, I simplified it too much. The one or both of the first two below may work but i do not know how to apply them. Say I have "-y -ax3 +rx2 -stx2 t"I wanted, if "-" followed "x" before a space, then replace the "x" with

Re: Regexp Functions

2020-06-09 Thread Aaron Hill
On 2020-06-09 12:42 am, Freeman Gilmore wrote: I do no tthink this is what i want. Let me try again Say you have "Xsdfghjkl" If "x" is the first character then replace the "g" if it exist with "Y" => "XsdYfhjkl"X /(^A.*)B/ is the general pattern: () Match the regex below an

Re: Regexp Functions

2020-06-09 Thread Aaron Hill
On 2020-06-09 9:25 am, Michael Gerdau wrote: [sent this earlier and forgot to include the list...] That definition helps. I use the Guile manual, the section Regular Expressions is miss leading about what is there.I only went there because Arron Hill told me about it And the introdu

Re: Regexp Functions

2020-06-09 Thread Michael Gerdau
[sent this earlier and forgot to include the list...] > That definition helps. I use the Guile manual, the section Regular > Expressions is miss leading about what is there.I only went there > because Arron Hill told me about it And the introduction states "A > full description of regu

Re: Regexp Functions

2020-06-09 Thread Freeman Gilmore
t;Jacques Menu" > Cc: "Lilypond-User Mailing List" > Sent: Tuesday, June 09, 2020 2:55 PM > Subject: Re: Regexp Functions > > > On Tue, Jun 9, 2020 at 6:51 AM Jacques Menu wrote: > > > > Hello Freeman, > > > > > Le 9 juin 2020 à 09:43, Freem

Re: Regexp Functions

2020-06-09 Thread Freeman Gilmore
Thank you that should help, ƒg On Tue, Jun 9, 2020 at 10:01 AM Jacques Menu wrote: > > Hello Freeman, > > The reference I use is http://www.cplusplus.com/reference/regex/ECMAScript/ . > > Greed is mentioned under ‘Quantifiers‘ > > HTH! > > JM > > > Le 9 juin 2020 à 15:55, Freeman Gilmore a écrit

Re: Regexp Functions

2020-06-09 Thread Phil Holmes
I've always found http://www.regular-expressions.info/ very helpful. -- Phil Holmes - Original Message - From: "Freeman Gilmore" To: "Jacques Menu" Cc: "Lilypond-User Mailing List" Sent: Tuesday, June 09, 2020 2:55 PM Subject: Re: Regexp Functio

Re: Regexp Functions

2020-06-09 Thread Jacques Menu
Hello Freeman, The reference I use is http://www.cplusplus.com/reference/regex/ECMAScript/ . Greed is mentioned under ‘Quantifiers‘ HTH! JM > Le 9 juin 2020 à 15:55, Freeman Gilmore a écrit : > > On Tue, Jun 9, 2020 at 6:51 AM Jacques Menu wrote: >> >> Hello Freeman, >> >>> Le 9 juin 2020

Re: Regexp Functions

2020-06-09 Thread Freeman Gilmore
On Tue, Jun 9, 2020 at 6:51 AM Jacques Menu wrote: > > Hello Freeman, > > > Le 9 juin 2020 à 09:43, Freeman Gilmore a écrit > > : > > > > On Tue, Jun 9, 2020 at 1:25 AM Michael Gerdau wrote: > >> > >> Hi! > >> > >> I find your description difficult to understand. Maybe you could provide > >> a

Re: Regexp Functions

2020-06-09 Thread Jacques Menu
Hello Freeman, > Le 9 juin 2020 à 09:43, Freeman Gilmore a écrit : > > On Tue, Jun 9, 2020 at 1:25 AM Michael Gerdau wrote: >> >> Hi! >> >> I find your description difficult to understand. Maybe you could provide an >> set of examples showing exactly what you wish to be modified into what. >

Re: Regexp Functions

2020-06-09 Thread Freeman Gilmore
On Tue, Jun 9, 2020 at 1:25 AM Michael Gerdau wrote: > > Hi! > > I find your description difficult to understand. Maybe you could provide an > set of examples showing exactly what you wish to be modified into what. Sorry, that is the problem I have when someone asks about what i am doing or tryin

Re: Regexp Functions

2020-06-09 Thread Freeman Gilmore
On Mon, Jun 8, 2020 at 4:31 PM Aaron Hill wrote: > > On 2020-06-08 12:47 pm, Caio Barros wrote: > > Hello! > > > > Em seg., 8 de jun. de 2020 às 08:37, Freeman Gilmore < > > freeman.gilm...@gmail.com> escreveu: > > > >> If the string is "A ... B ... " , using Regexp Functions is it > >> possible

Re: Regexp Functions

2020-06-08 Thread Michael Gerdau
Hi! I find your description difficult to understand. Maybe you could provide an set of examples showing exactly what you wish to be modified into what. Apart from that your problem sounds as if it is trivial when using non greedy regular expressions. As Aaron already wrote you need expressions

Re: Regexp Functions

2020-06-08 Thread Freeman Gilmore
Caio and Arron: I am writing this at the top to start over and answer Caio's questions. Say you have an accidental string name "A..." and the stem is up; then the same accidental with the stem down would be named "-A...". "A".. would be a short string like LilyPond uses for accidental

Re: Regexp Functions

2020-06-08 Thread Aaron Hill
On 2020-06-08 12:47 pm, Caio Barros wrote: Hello! Em seg., 8 de jun. de 2020 às 08:37, Freeman Gilmore < freeman.gilm...@gmail.com> escreveu: If the string is "A ... B ... " , using Regexp Functions is it possible, if 'A' matches [-] then 'B' would be replaced by "C"?'A' is first in the

Re: Regexp Functions

2020-06-08 Thread Caio Barros
Hello! Em seg., 8 de jun. de 2020 às 08:37, Freeman Gilmore < freeman.gilm...@gmail.com> escreveu: > If the string is "A ... B ... " , using Regexp Functions is it > possible, if 'A' matches [-] then 'B' would be replaced by "C"?'A' > is first in the string. Position of B is not constant.a