This is the same regex as cookies.js