I would recommend using data shapes, eventually I'll write some examples in ShEx https://shex.io/shex-primer/#tripleConstraints

The following regular expression conventions are used to specify cardinalities other than the default of "exactly one" (see the example in Quick Start, with cardinality "one or two").

- "+" - one or more
- "*" - zero or more
- "?" - zero or one
- "{m}" - exactly m
- "{m,n}" - at least m, no more than n