title: Casting a list to String in scala
body: <p>I am playing with scala lately but basically here is what I am trying</p>
  
  <pre><code>  //specify a pattern
    val ptn = "(('[^']*')|([^,]+))".r
    val test = "foo,bar,'foo,bar'"
    pth.findAllmatchIn(test).toArray
  
  
  
   gives Array[scala.util.matching.Regex.Match] = Array(foo and bar, bar and foo, 'foo, is bar')
  </code></pre>
  
  <p>What I was hoping for was Array[String] in return? But I dont want an extra loop to do typecasting.
  Since I am new in scala, I was wondering if there is some other way to get the results of regex as string?
  Thanks</p>