Return the 1‐based index of the sub‐pattern having the specified name in the pattern held by this regular‐expression object (pattern()); return ‐1 if pattern() does not contain a sub‐pattern identified by name or name is not unique. The behavior is undefined unless isPrepared() == true. Note that the returned value is intended to be used as an index into the bsl::vector<bsl::pair<int, int> > returned by match. Also note that the function namedSubpatterns can be used to find the sub‐pattern index when there are duplicate named sub‐patterns.

Synopsis

Declared in <bdlpcre_regex.h>

int
subpatternIndex(char const* name) const;

Created with MrDocs