Most of this is sugar, e.g. flat() and flatMap(), out of scope for a language spec.
Function.toString being more accurate is helpful.
But real progress would be removing dangerous backtracking regular expressions in favor of RE2: https://github.com/google/re2/wiki/Syntax