Added option to filter function hooks based on regex