ocaml-re
ocaml-re copied to clipboard
Doc: sem and rep_kind
Could you clarify that in Core, the longest/shortest/first/greedy/non_greedy combinators do not change which strings match the regex per execp, and only change the extent of capturing?
longest/shortest/greedy/non_greedy do affect both matching and capturing. I guess what you mean is that if a string match the long (resp greedy) version, it will also match the short (non greedy) version. I do not remember if that is correct with all the operators we have in re, but I think it works in the posix subset.
I don't remember what's the semantics of first (I guess it only capture the leftmost instance). Which shows that it should be documented indeed. :D