How can I use a regular expression and matching to replace contents of a string? In particular I want to detect integer numbers and increment them. Like so:
val y = "There is number 2 here"
val p = "\\d+".r
def inc(x: String, c: Int): String = ???
assert(inc(y, 1) == "There is number 3 here")