I have a really long in-memory string stored in a val response: String
that looks something like
HTTP/1.1 200 OK
Server: Apache
Other: headers
<response>
<xml>
---much much more XML---
</xml>
</response>
0
I want to extract the
<response>
...
</response>
part of the string. So far, I have this:
"<response>.*?</response>".r findFirstIn response
...but for some reason Scala returns None. I did figure out a way to do this with indices and the slice function, but there has to be a neat way with regex. Anyone know how?