The substring before the delimiter, or on_missing.
A delimiter at the beginning, including an empty string delimiter, returns an
empty string rather than on_missing. Useful for extracting a path or field prefix.
Regex flags are preserved; matching starts at zero without reading or changing the
caller's lastIndex. Global regexes use the first match; sticky regexes must match at zero.
Returns the substring before the first occurrence of the delimiter.
The substring before the delimiter, or on_missing.
A delimiter at the beginning, including an empty string delimiter, returns an
empty string rather than on_missing. Useful for extracting a path or field prefix.
Regex flags are preserved; matching starts at zero without reading or changing the
caller's lastIndex. Global regexes use the first match; sticky regexes must match at zero.
Returns the substring before the first occurrence of the delimiter.