parse-ingredient - v3.0.0
    Preparing search index...

    Function buildTrailingRangeSeparatorRegex

    • 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.

      Parameters

      • words: readonly (string | RegExp)[]

      Returns RegExp