I want to find a match (if any) for a regular expression on a string, but only testing after a given index. For example:
val p = "[a-zA-Z_][a-zA-Z0-9_]*".r
val t = "const pi = 3.141592"
val m = p.findFirstMatchIn(t, start=5) // not real syntax
That is, I want to ignore the first n = 5 characters of the string. Is there any way to do that?
p.findFirstMatchIn(t.drop(5))