Put brackets around `s` and `pattern`, otherwise advanced compilation will fail.