Replace sub-string

2020-05-22 Thread Freeman Gilmore
Is there a procedure, to replace 'all' occurrences of a sub-string within a string. with a string? If so please give an example. Thank you, ƒg

Re: Replace sub-string

2020-05-22 Thread Aaron Hill
On 2020-05-22 8:38 pm, Freeman Gilmore wrote: Is there a procedure, to replace 'all' occurrences of a sub-string within a string. with a string? If so please give an example. regexp-substitute/global [1] should do the job. [1]: https://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/Regexp

Re: Replace sub-string

2020-05-23 Thread David Pirotte
Hello, > On 2020-05-22 8:38 pm, Freeman Gilmore wrote: > > Is there a procedure, to replace 'all' occurrences of a sub-string > > within a string. with a string? > > If so please give an example. > regexp-substitute/global [1] should do the job. > [1]: > https://www.gnu.org/software/guile/d

Re: Replace sub-string

2020-05-28 Thread Freeman Gilmore
Arron: Just getting to this and having a problem. See below. On Sat, May 23, 2020 at 12:31 AM Aaron Hill wrote: > > On 2020-05-22 8:38 pm, Freeman Gilmore wrote: > > Is there a procedure, to replace 'all' occurrences of a sub-string > > within a string. with a string? > > If so please give an

Re: Replace sub-string

2020-05-28 Thread Aaron Hill
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 bri

Re: Replace sub-string

2020-05-28 Thread Freeman Gilmore
On Thu, May 28, 2020 at 8:10 AM Aaron Hill 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 vari