title: A regex in query in Grafana
body: <p>I am a new developer in Grafana and I would like to have a query that returns a variable having &quot;CA&quot; at the END of its name.</p>
  <p>I was using SEARCH key code but it seems that it returns only the contained characters while I am really interested in the location of those characters.</p>
  <p>As an example, I wrote this query :</p>
  <pre><code>SELECT cmts_device SEARCH CA
  </code></pre>
  <p>And it shows me this as a result :</p>
  <p><a href="https://i.stack.imgur.com/04W2a.png" rel="noreferrer"><img src="https://i.stack.imgur.com/04W2a.png" alt="enter image description here" /></a></p>
  <p>As you can see, it returns some values like : &quot;CAE1CC&quot;, &quot;CAE2CC&quot;, &quot;CAE3CC&quot; which have the &quot;CA&quot; substring but they end by &quot;CC&quot; not &quot;CA&quot;.</p>
  <p>How can I fix this pleaase ?
  Thank you for any help !</p>