lilypond-user
[Top][All Lists]
Advanced

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

Re: Replace sub-string


From: Freeman Gilmore
Subject: Re: Replace sub-string
Date: Thu, 28 May 2020 08:26:31 -0400

On Thu, May 28, 2020 at 8:10 AM Aaron Hill <lilypond@hillvisions.com> wrote:
>
> On 2020-05-28 4:46 am, Freeman Gilmore wrote:
> > Just getting to this and having a problem.   See below.
>
> > \version "2.20.0"
> > #(regexp-substitute/global #f "[ \t]+" "this   is   the test" 'pre "-"
> > 'post)
> >
> > Gives:  Unbound variable: regexp-substitute/global
> >
> > What am i missing?
>
> You will need to bring in the regular expression module:
>
> %%%%
> \version "2.20.0"
>
> #(use-modules (ice-9 regex))
>
> \markup
>    #(regexp-substitute/global #f
>      "[ \t]+"
>      "this   is   the test"
>      'pre "-" 'post)
> %%%%
Thank you, that works.   Do you normally places '#(use-modules (ice-9
regex))' with the include files?
>
> NOTE: I am using \markup above as a simple way to visualize the
> resulting string.
I did not know about using this, this way, thanks
>
>
> -- Aaron Hill



reply via email to

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