Flarum (2.x)
    Preparing search index...
    • Find the ranges of text that regexp matches, as [start, end] pairs.

      Every match is returned when regexp has the global flag, otherwise only the first one. Empty matches are left out, as there is nothing to wrap.

      Parameters

      Returns [number, number][]