Match subject against pattern(), loading subpattern matches into result.

Synopsis

Declared in <bdlpcre_regex.h>

int
match(
    bsl::vector<std::string_view>* result,
    std::string_view const& subject,
    size_t subjectOffset = 0) const;

Description

Begin matching at the optionally specified subjectOffset. UTF‐8 validity checking is performed on subject if pattern() was prepared with k_FLAG_UTF8. Return k_STATUS_SUCCESS on success.

Return Value

k_STATUS_SUCCESS on success, k_STATUS_NO_MATCH if no match, or another status on error

Parameters

Name

Description

result

receives match and sub‐pattern matches as string views

subject

subject string to match

subjectOffset

offset in subject at which matching begins

Created with MrDocs