I got this regex
(?<=token=)(.*?)(?=;)
and on the https://regex101.com it says that
? The preceding token is not quantifiable
I'm trying to get string after token=
excluding it and before first ;
excluding it too
string = [ 'nginx/1.15.2',
'Fri, 22 Feb 2019 22:39:19 GMT',
'application/json',
'76',
'close',
[ 'token=fCMNSX6y85W.7jOzwvpp8GQ; Secure; HttpOnly; expires=Wed, 21 Oct 2099 04:24:00 GMT' ],
'content-type,cache-control,pragma,x-request-id',
'true' ] '
if I'm using this regex token=(.*?)(?=;)
I'm getting token=fCMNSX6y85W.7jOzwvpp8GQ
so, all I need from this string is fCMNSX6y85W.7jOzwvpp8GQ