Gets the substrings around a specific target.
This function is valid in
v2.10.0 to v2.17.1.
This function has been downloaded 14 times.
The string to search.
The target to find and key off of within
The occurrence of
target that you want to key off of within
subject. If negative, the occurrence will be counted from the end of
Returns an array with two values: the string found before
target and the string found after
target was not found or the specified occurrence (
target was not found,
[null, null] will be returned.
This function requires the following functions which are included automatically:
Creates a new copy of a regular expression with modified flags.
Turn any string into a regular expression that matches the exact string without worrying about encoding the metacharacters yourself.
Either gets the type of a value or adds a constructor registering its custom type name.
Finds the substring after a specific target.
Finds the substring before a specific target.