Function notCharRange

  • Match a character not in the range of first to second char.

    Escape sequences are supported and the two characters must be in order.

    notCharRange is a short form of not.charRange. For more details, see the documentation of charRange.

    Parameters

    • template: TemplateStringsArray
    • Rest ...args: unknown[]

    Returns HalfCharRangeFunction & IncompleteToken

    Example

    notCharRange`a` `z`
    not.charRange`a` `z`
    notCharRange('a', 'z')

    RegExp equivalent:

    /[^a-z]/
    
  • Match a character not in the range of first to second char.

    Escape sequences are supported and the two characters must be in order.

    notCharRange is a short form of not.charRange. For more details, see the documentation of charRange.

    Parameters

    • start: string
    • end: string

    Returns RegExpToken

    Example

    notCharRange`a` `z`
    not.charRange`a` `z`
    notCharRange('a', 'z')

    RegExp equivalent:

    /[^a-z]/
    
  • Match a character not in the range of first to second char.

    Escape sequences are supported and the two characters must be in order.

    notCharRange is a short form of not.charRange. For more details, see the documentation of charRange.

    Parameters

    • start: string

    Returns HalfCharRangeFunction & IncompleteToken

    Example

    notCharRange`a` `z`
    not.charRange`a` `z`
    notCharRange('a', 'z')

    RegExp equivalent:

    /[^a-z]/
    

Generated using TypeDoc