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

    Function buildStripPrefixRegex

    • Builds a regex that matches any of the given words or patterns at the start of a string. Strings are matched as whole words followed by whitespace. RegExp patterns are used as-is for more complex matching (e.g., French elisions).

      Parameters

      • patterns: readonly (string | RegExp)[]

      Returns RegExp | null