fix regexp for onEvent shorthand