HH\Lib\Regex\every_match
Requires the Hack Standard Library to be installed.
Facebook Engineer?
This function is available as Regex\every_match()
in Facebook's www repository.
Returns all matches found in $haystack
given the regex pattern $pattern
and an optional offset at which to start the search
namespace HH\Lib\Regex;
function every_match<T as Match>(
string $haystack,
Pattern<T> $pattern,
int $offset = 0,
): vec<T>;
Throws Invariant[Violation]Exception if $offset
is not within plus/minus the length of $haystack
.
Parameters
string $haystack
Pattern<T> $pattern
int $offset = 0
Returns
vec<T>