Builds a regex that matches a range separator at the end of a string, ignoring
trailing whitespace. The backwards counterpart of buildRangeSeparatorRegex,
used when scanning right-to-left from an already-located unit of measure.
The source is wrapped in a non-capturing group rather than read by index: it may
contain groups of its own, from user-supplied rangeSeparators.
Builds a regex that matches a range separator at the end of a string, ignoring trailing whitespace. The backwards counterpart of buildRangeSeparatorRegex, used when scanning right-to-left from an already-located unit of measure.
The source is wrapped in a non-capturing group rather than read by index: it may contain groups of its own, from user-supplied
rangeSeparators.