Regex insted of function and removed pull.

Updated to use regex insted of function and removed the pull of another
user so you can pull his fix insted of mine for events not triggering.