I have these rules:
while: 'while' expr 'do' program;
if: 'if' expr 'then' program 'else' program;
I don't care what expr
contains, so how can I take everything there until then
or do
?
I tried:
expr: .*?~('then'|'do');
but it is not working. Why?