With this RiveScript:
+ a a a a
- Got a a a a
+ a a ab a
- Got a a ab a
! sub ab = a
and input "ab ab ab ab", the output should be "Got a a a a". Instead, the output is "Got a a ab a".
Problem is this line need to be executed as long as it makes a change:
msg = re.sub(cache["sub3"], r'\1' + placeholder + r'\2', msg)