title: Scala: how to construct a regex including a variable?
body: <p>I want to test if a <code>regex</code> including a variable that I defined before matches a string.</p>
  
  <p>For instance I would like to do : </p>
  
  <pre><code>val value = "abc"
  regex = "[^a-z]".r + value //something like that
  if(regex matches ".abc") print("ok, it works")
  </code></pre>
  
  <p>So my question is : <strong>how can I add construct a regex including a variable in scala?</strong> </p>