Function notAhead

  • Wrap the given token in a negative lookahead.

    notAhead is a short form of not.ahead. See the documentation of ahead for more details.

    Parameters

    • literal: string

    Returns RegExpToken

    Example

    notAhead`foo`
    not.ahead`foo`
    notAhead.exactly`foo`
    notAhead('foo')

    RegExp equivalent:

    /(?!foo)/
    
  • Wrap the given token in a negative lookahead.

    notAhead is a short form of not.ahead. See the documentation of ahead for more details.

    Parameters

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

    Returns RegExpToken

    Example

    notAhead`foo`
    not.ahead`foo`
    notAhead.exactly`foo`
    notAhead('foo')

    RegExp equivalent:

    /(?!foo)/
    
  • Wrap the given token in a negative lookahead.

    notAhead is a short form of not.ahead. See the documentation of ahead for more details.

    Parameters

    Returns RegExpToken

    Example

    notAhead`foo`
    not.ahead`foo`
    notAhead.exactly`foo`
    notAhead('foo')

    RegExp equivalent:

    /(?!foo)/
    

Generated using TypeDoc