Accepted answer

You want the first match:


(Will be an Option[String].)

That said, I'd use a streaming JSON parser every time over a regex. Yes, the regex is faster, but unless this is really a bottleneck, I would be more worried about accuracy.

Related Query

More Query from same tag