Here's how the algorithm in balancedString() was modified. When we
encounter a slash in an interpolation, we:
* try to find a heregex right after it; if found---skip it. Three
slashes always terminate a heregex, no matter if there is an open
"#{" before them or not, so we don't have to bother about
sub-interpolations inside the heregex.
* try to find a regex right after it; if found---skip it. Simple
regexen can't contain interpolations.
* otherwise, assume that the slash means division and carry on.