Re: Matching backslash in Scheme string (escaping characters for LaTeX)

2015-01-21 Thread David Nalesnik
On Wed, Jan 21, 2015 at 1:43 AM, Urs Liska wrote: > > Am 21.01.2015 um 08:41 schrieb Johan Vromans: > >> On Wed, 21 Jan 2015 08:31:53 +0100 >> Urs Liska wrote: >> >> So what's the way to match a backslash in a LilyPond string? >>> >> My guess is four backslashes. >> >> To match a backslash you

Re: Matching backslash in Scheme string (escaping characters for LaTeX)

2015-01-20 Thread Urs Liska
Am 21.01.2015 um 08:41 schrieb Johan Vromans: On Wed, 21 Jan 2015 08:31:53 +0100 Urs Liska wrote: So what's the way to match a backslash in a LilyPond string? My guess is four backslashes. To match a backslash you need \\ in the pattern. Each of these need to be escaped in the string, so it

Re: Matching backslash in Scheme string (escaping characters for LaTeX)

2015-01-20 Thread Johan Vromans
On Wed, 21 Jan 2015 08:31:53 +0100 Urs Liska wrote: > So what's the way to match a backslash in a LilyPond string? My guess is four backslashes. To match a backslash you need \\ in the pattern. Each of these need to be escaped in the string, so it becomes . -- Johan

Matching backslash in Scheme string (escaping characters for LaTeX)

2015-01-20 Thread Urs Liska
Hi all, I have a Scheme function that processes a string and writes the result to a LaTeX file. For this I have to escape a number of characters that are allowed in a LilyPond string but not in LaTeX input. Consider this code: \version "2.19.16" #(use-modules (ice-9 regex)) str = "This shou