namedFieldRegexMatches

namedFieldRegexMatches returns an input range iterating over all the fields (strings) in an input range that match a regular expression. (Private function.)

This routine is used in conjunction with namedFieldGroupToRegex to find the set of header line fields that match a field in a field-group expression. The input is a range where the individual elements are strings, e.g. an array of strings.

The elements of the returned range are a tuple where the first element is the one-based field number of the matching field and the second is the matched field name. A zero-based index is returned if convertToZero is Yes.

The regular expression must not be empty.

private
namedFieldRegexMatches
(
T = size_t
ConvertToZeroBasedIndex convertToZero = No.convertToZeroBasedIndex
Range
)
(,
Regex!char fieldRegex
)
if (
isInputRange!Range &&
is(ElementEncodingType!Range == string)
)

Meta