On 28-01-2023 22:07, Vagrant Cascadian wrote: > The other thing I remember being caught up on, which was not a > deal-breaker, per se, was hoping for a way to loop through a bunch of > @SOMETHING things ... I was not happy with: > > + (if (>= (string-length (string-replace-substring > + (string-replace-substring synopsis "@acronym" "") > + "@code" "")) > + 80) > > And then adding @command, @file, @acronym, etc. ... using increasingly > nested levels string-replace-substring would eventually become difficult > to read and surely there is a better way! How about some regex: (define regexp (delay (make-regexp "@(code|acronym|file)\\b"))) (define example "stuff @acronym @code @file") (regexp-substitute/global #f (force regexp) example 'pre "" 'post) $4 = "stuff ". Greetings, Maxime.