I'm reading through a bunch of random "Header" information in node.
It looks something like this:
_Aa:GA1.1.78037747.867108, 44907=5xyz; Webstorm-a36041d5=9fbb-48e9-b19e-e3f0a3282151; srce=coolernode; nsid=1234; cookie_data=T%3D1; _gat_PP=1;
Problem: I'm trying to write a regEx or something to parse out "cookie_data" value from the string.
Is it possible to convert it to a map or extract cookie_data=T%3D1?
I've tried doing:
const i= str.indexOf('cookie_data');
const res = str.chatAt(i);
But still going nowhere, since I can't keep traversing until i get ';'
Wondering to see if there's any other effective way to extract info?
T%3D1?