Function beforeAfterMatch

Returns the text that is before and after match.

See also: beforeMatch, afterMatch.

If match is at the end of start of source, after or before might be an empty string.

  • Parameters

    • source: string
    • match: string
    • options: Partial<MatchOptions> = {}

    Returns [before: string, after: string]