Hi all, I'm working on my Greek module again and am trying to filter and massage the input via lpeg, but there's something I don't quite get. As a minimal example: suppose I want to substitute A and B in my input with X and leave all other letters alone. Here's my attempt: \startluacode do local replace = { A = "X", B = "X", } local dosub = (lpeg.Cs(1)) / replace local subs = (dosub)^0 function test (string) tex.sprint(lpeg.match(subs,string)) end end \stopluacode \def\Substitute#1{\ctxlua{test("#1")}} \starttext \Substitute{ABC} \stoptext It substitutes alright, but the "C" is not included in the stream which ctxlua gives to TeX. How can I modify my lpeg pattern? Thanks, and all best Thomas