Nginx access log parsing

Hi,

I am using new relic agent to send nginx access log also using the default nginx default parser through which i am getting referrer attributes.
now i have to prase domain name from referrer attributes and save it as referrer_domain attributes
I am using grok pattern to extract the data it’s working in grok debugger
%{URIPROTO:referrer_proto}://(?:%{URIHOST:referrer_domain})?(?:%{URIPATH:referreruri_param})
but i am not getting referrer_domain in log PFA for the parsing rule.

I have to run this parsing on every referrer attributes not on a single value. how can i achieve this?