Updated function/event regex