cookies - REGEX HELP to insert string in header -
i'd insert safety preference pref=f2=8000000
in outgoing cookie youtube. can please regex required. please see cookie header without , below:
original:
sid=dqaaaoyaaabor9h2kgqmkq1kw7rbrguqb6dnjpqxtp0zn4grw27qbtf_vzbkkixpce6jof7kvtt8rry72g8tv6lyolxu5rqnqwytujunhz__7uew4lkiz89vmnlouhw3nsrkrg4qqidvmhhys4ubr2yjwwqq6syk4yl0lnq2hrp3ud5cgzda_cq_vxn9g1tadrzpcn5aqcoctwlrrv-cg23rz3a6ch-2fvfqt_vdx1qqbio5hiy6bd5slfkzqr9hsgpq61py_ba2hgszphpa8ui0l4wdru-zg2jwlj3tbtj3dq3qidovhnmfvxt8rics0gbun3iltvy; hsid=aniiq2v5699ch1ogg; apisid=xxqluldsz9yv9cwf/ax_rce3i9fzrh0bda; visitor_info1_live=m46yoeobrtu; login_info=9f010d0f2ad7425d84ae06a16d0aa294c34aaab7ijgioiaxmzc0ndk3njuxodksici3ijogmtm5mtuxmza4mcwgijyioibmywxzzswgijuioiawlcainci6icjhqulbiiwgijmioiazmzaxndc1odusiciyijogilk0ctlxy2ppauo1rzn4vthgwel1dhc9psisicixijogmx0=; pref=fv=12.0.0&f1=10000000&al=en-gb; ysc=qf6d6pkhmtq; activity=1391513121453
(see pref=f2=8000000 included @ end.)
desired
sid=dqaaaoyaaabor9h2kgqmkq1kw7rbrguqb6dnjpqxtp0zn4grw27qbtf_vzbkkixpce6jof7kvtt8rry72g8tv6lyolxu5rqnqwytujunhz__7uew4lkiz89vmnlouhw3nsrkrg4qqidvmhhys4ubr2yjwwqq6syk4yl0lnq2hrp3ud5cgzda_cq_vxn9g1tadrzpcn5aqcoctwlrrv-cg23rz3a6ch-2fvfqt_vdx1qqbio5hiy6bd5slfkzqr9hsgpq61py_ba2hgszphpa8ui0l4wdru-zg2jwlj3tbtj3dq3qidovhnmfvxt8rics0gbun3iltvy; hsid=aniiq2v5699ch1ogg; apisid=xxqluldsz9yv9cwf/ax_rce3i9fzrh0bda; visitor_info1_live=m46yoeobrtu; login_info=9f010d0f2ad7425d84ae06a16d0aa294c34aaab7ijgioiaxmzc0ndk3njuxodksici3ijogmtm5mtuxmza4mcwgijyioibmywxzzswgijuioiawlcainci6icjhqulbiiwgijmioiazmzaxndc1odusiciyijogilk0ctlxy2ppauo1rzn4vthgwel1dhc9psisicixijogmx0=; pref=f2=8000000&f1=10000000&fv=12.0.0&al=en-gb; ysc=qf6d6pkhmtq; activity=1391513121453
in perl:
s/(.+pref=)(.+)/$1f2=8000000&$2/
Comments
Post a Comment