Creating Variable with regex for Kibana Elasticsearch

I jsut started to use Grafana and I have a question to use regex and variables for creating new variable.
I already made PROCESS and MODEL variables.
I am using Kibana 7.12.0.

I want to extract scriptA part from contetns which matches to PROCESS and MODEL variables.
How can I try it with Regex?

<contents.keyword example>
Script Fail - process: machineA, model: modelA, script: scriptA

I thought the following regex would work but it did’nt.
.Script Fail - process: $PROCESS, model: $MODEL, script: (\S+).