parse-ingredient - v2.1.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: (string | RegExp)[]

      Returns RegExp