When running the regular expression Re.rep1 (Re.alt [Re.epsilon; Re.any]) on a string "foobarbaz", we get the match "foobarbaz" (running Re.Group.Get (Re.exec re "foobarbaz) 0").
I know other regular expression libraries assign precedence highest to lowest from left to right within alternations and was wondering if there is a formal policy followed in ocaml-re for deciding which alternated expression gets precedence in a match.
When running the regular expression
Re.rep1 (Re.alt [Re.epsilon; Re.any])on a string"foobarbaz", we get the match"foobarbaz"(runningRe.Group.Get (Re.exec re "foobarbaz) 0").I know other regular expression libraries assign precedence highest to lowest from left to right within alternations and was wondering if there is a formal policy followed in ocaml-re for deciding which alternated expression gets precedence in a match.