This blob of code doesn't do good things for the readability of `stringMatch`. Rather than adding a comment, I just extracted the whole inside of that `if()` into a separate function. I thought about extracting the creation of the string ranges into a separate function, but I think more readable as it is.