Function zeroOrMoreLazily

  • Match a token 0 to infinite times, trying to match as short as possible.

    zeroOrMoreLazily is a short form of zeroOrMore.lazily. See the documentation of zeroOrMore for more details.

    Parameters

    • literal: string

    Returns RegExpToken

    Example

    zeroOrMoreLazily`foo`
    zeroOrMore.lazily`foo`

    RegExp equivalent:

    /(?:foo)*?/
    
  • Match a token 0 to infinite times, trying to match as short as possible.

    zeroOrMoreLazily is a short form of zeroOrMore.lazily. See the documentation of zeroOrMore for more details.

    Parameters

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

    Returns RegExpToken

    Example

    zeroOrMoreLazily`foo`
    zeroOrMore.lazily`foo`

    RegExp equivalent:

    /(?:foo)*?/
    
  • Match a token 0 to infinite times, trying to match as short as possible.

    zeroOrMoreLazily is a short form of zeroOrMore.lazily. See the documentation of zeroOrMore for more details.

    Parameters

    Returns RegExpToken

    Example

    zeroOrMoreLazily`foo`
    zeroOrMore.lazily`foo`

    RegExp equivalent:

    /(?:foo)*?/
    

Generated using TypeDoc