To be clear: the interpolation works fine, in both of the provided forms (with and without formatting). As usual with Scala, it's the possibility of replicating the functionality for my own purposes that gets me excited. I usually explain the whys and the hows of my code, but in this case a simple paste says it all, imho.
dcs@ayanami:~/github/scala (master)$ scala -Xexperimental Welcome to Scala version 2.10.0.rdev-4232-2012-01-23-g9a20086 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_26). Type in expressions to have them evaluated. Type :help for more information. scala> case class StringContext(parts: String*) { | object matching { | def unapplySeq(s: String): Option[Seq[String]] = { | val re = (parts map ("\\Q" + _ + "\\E") mkString ("^", "(.*?)", "$")).r | re findFirstMatchIn s map (_.subgroups) | } | } | def s(args: Any*) = scala.StringContext(parts: _*).s(args: _*) | } defined class StringContext scala> "23/01/2012" match { case matching"$day/$month/$year" => s"$month-$day-$year" } res0: String = 01-23-2012