I have such string:
val foo = "{foo} {bar} ... {sie}{ma}"
I want to extract characters from in between {}
but I want to get first occurence only. I use findFirstIn but it returns all matches.
"""\{.*\}""".r.findFirstIn(foo)
What am I doing wrong?
Aucun commentaire:
Enregistrer un commentaire