On Wed, 21 Jan 2015 11:23:40 +0100 Urs Liska <[email protected]> wrote:
> #(set! str > (regexp-substitute/global #f "&" str > 'pre "\\&" 'post)) > > However, this approach will get quite cumbersome (and expensive) when > there are numerous characters to be escaped. Therefore I'd like to know > if I can "fold" them in one regular expression substitution. I don't know what implementation of regular expression matching scheme uses, but you should be able to specify a character set (group of characters) to match, capture the matching character, and replace it by itself with "\\" prepended. -- Johan _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
