The above contract may be expressed as a regular expression, specifying that next may be invoked zero or multiple times, but if either error or complete are invoked, no other Observer method invocation can occur:
next*(error|complete)?
However, next* means nex always occurs, and t may be repeated zero or more times.
If you were to parenthesize it -- (next)* -- it would match the explanation.
Edit: I'm not sure why the diff is showing the last line has changed.
I edited the file on GitHub and only added parentheses.
The spec states that:
However,
next*
meansnex
always occurs, andt
may be repeated zero or more times. If you were to parenthesize it --(next)*
-- it would match the explanation.Edit: I'm not sure why the diff is showing the last line has changed. I edited the file on GitHub and only added parentheses.