Grafana variable, regex remove part of the response

I was trying to extract and remove a part of the response previously, when tried some expression i got the output which i need to remove.


Expectation is to remove the (RAW).
When trying this

(?:RAW\s+)?(.*)

we did not achieve the expectation.

So, with this expression we can achieve this,

^(.?)(?:\s(RAW))?$