case insensitive pattern match in Scala
<p>I want to do pattern matching in Scala but it should be case insensitive. Is there a way I can write the code without using separate 'case' clauses for lower and upper cases</p>

<pre><code>//person class with first name and last name
case class Person (var fn: String, val ln: String) {
  val name = fn
  val lastName = ln
}

//two instances. Same last name but cases are different
val a2 = Person("Andy","Cale")
val a3 = Person("Andy","cale")

def isCale(person:Person) {
person match {
//I want that this case should be case insensitive
  case Person(_,"Cale") =&gt; println("last-name Cale")
  case _ =&gt; println("not Cale")
}
}
isCale(a2) 
lastname Cale

//I want this to also match 
isCale(a3)
not Cale
</code></pre>

<p>One alternative is to extract the last name and compare as follows but I am interested in finding if there is a way to do this in case itself.</p>

<pre><code>def isCale(a2:A2) {
  val s = a2.ln

  s.toLowerCase match {
  case "cale" =&gt; println("last-name Cale")
  case _ =&gt; println("not Cale")
}
</code></pre>