@yookue/ts-lang-utils
    Preparing search index...

    Function extractWords

    • Returns the array of strings that match the given pattern in the text

      Parameters

      • Optionaltext: null | string

        the text to inspect

      • search: string | RegExp = ...

        the string or regex to match

      Returns undefined | string[]

      the array of strings that match the given pattern in the text

      David Hsing

      extractWords('foo, & bar');    // ['foo', 'bar']