title: Scala string pattern matching for mathematical symbols
body: <p>I have the following code:</p>
  
  <pre><code>val z: String = tree.symbol.toString
  z match {
    case "method +" | "method -" | "method *" | "method ==" =&gt;
      println("no special op")
      false
    case "method /" | "method %" =&gt;
      println("we have the special div operation")
      true
    case _ =&gt;
      false
  }
  </code></pre>
  
  <p>Is it possible to create a match for the primitive operations in Scala:</p>
  
  <pre><code>"method *".matches("(method) (+-*==)")
  </code></pre>
  
  <p>I know that the (+-*) signs are used as quantifiers. Is there a way to match them anyway?
  Thanks from a avidly Scala scholar!</p>