How to combine many requests from multiple query to a single cell. (Loki)

  • What Grafana version and what operating system are you using?
  • What are you trying to achieve?
    i try to combine many requests (like /imgpx/asd, /imgpx/asd2 etc. to"imgpx/") to one with regex
  • How are you trying to achieve it?
    In panel settings

screenshots? I think we need more info here to help you

Please, say what info i should give?
we are using Loki as a Data Sourse, panel – Time Series
my query something like that:

sum by (url)
|~ "\"response_code\":\"5.*\"" 
| json 

In screenshot above I try to show that i have a few strings with different urls which show how much 5xx errors we have on that url.
I want to merge all strings which starts from /imgprx/.* and summarize their values