The 1
in 1 - lpeg.S"()"
means any character. The whole statement can be read as, match any character while not matching a character in the set "()"
.
The +1
is the same idea, if repl
is a string then patt / repl + 1
matches pattern patt
and then replaces it's capture with the string repl
or skips a character.