Created
March 5, 2015 17:28
-
-
Save rashad612/d55cb345d5baf191cc83 to your computer and use it in GitHub Desktop.
javaScript: Search for cookie [ name or value ]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var search = 'search-phrase'; | |
var matches = document.cookie.split(';').filter(function(e) { return new RegExp(search, 'gi').test(e); }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
works like a charm , thanks mate