Added function to delete all keys matching a pattern