I am using the below code to filter all the cookies stored using a regular expression.
$.cookies.filter( '/^'+path+'/' ).each(function(a)
{
alert($.cookies.get(a));
});
It seems the way I wrote regular expression is wrong. Please help on this.
I am using this library to deal with Cookies.
The syntax for regular expressions is either delimited by
/(without any quotes) or as a string passed toRegExpclass. I don’t know how to include variables if you define as/delimited regex, but without variables it would look like this…