It's probably trying to print whitespace, I've altered the regex such that at least one non-whitespace character must be present to match.

Code:
alias innertext {
  return $regex($2,$$1-,/>(\s*(?:[^>\s]+?\s*)+)<\//g)
}