Optimize cookie regex (again), fix #46 (again)