title: Scala - case match partial string
body: <p>I have the following:</p>
  
  <pre><code>serv match {
  
      case "chat" =&gt; Chat_Server ! Relay_Message(serv)
      case _ =&gt; null
  
  }
  </code></pre>
  
  <p>The problem is that sometimes I also pass an additional param on the end of the serv string, so:</p>
  
  <pre><code>var serv = "chat.message"
  </code></pre>
  
  <p>Is there a way I can match a part of the string so it still gets sent to Chat_Server?</p>
  
  <p>Thanks for any help, much appreciated :)</p>