peberminta - v0.10.0
    Preparing search index...

    Function charTest

    • Make a parser that uses regular expressions to match/non-match characters belonging to a certain range or having a certain unicode property.

      Provide a positive expression to accept only characters that satisfy it. Provide a negative expression to reject characters that satisfy it. If both are given a character must match positive (when provided) AND must NOT match negative (when provided).

      At least one of the arguments must be provided (throws otherwise).

      Use satisfy from core module instead if you need an arbitrary predicate.

      Tokens expected to be individual characters / graphemes.

      Type Parameters

      • TOptions

      Parameters

      • positive: undefined | RegExp

        Regular expression that must match (optional).

      • Optionalnegative: RegExp

        Regular expression that must not match (optional).

      Returns Parser<string, TOptions, string>