In OCaml, how can I specify the number of occurrences for a template in regex? I went through the Str module and cannot find the equivalent for the quantifier {n} .
For example, if I want to specify the template "Year", i.e. exactly 4 digits, is there any way other than executing "[0-9][0-9][0-9][0-9]" ?
Thanks.
xysun source share