matchRaw overloads

Synopses

Declared in <bdlpcre_regex.h>

Match the specified subject against pattern(). Begin matching at the optionally specified subjectOffset in subject. If subjectOffset is not specified, matching begins at the start of subject. Return k_STATUS_SUCCESS on success, k_STATUS_NO_MATCH if a match is not found, and another value if an error occurs. If the returned status is not k_STATUS_SUCCESS or k_STATUS_NO_MATCH it may match one of specific k_STATUS_* error return constants defined above (but is not guaranteed to). The behavior is undefined unless true == isPrepared(), subjectOffset <= subject.length(), and subject is valid UTF‐8 if pattern() was prepared with k_FLAG_UTF8.

int
matchRaw(
    std::string_view const& subject,
    size_t subjectOffset = 0) const;

Match the specified subject against pattern(). Begin matching at the optionally specified subjectOffset in subject. If subjectOffset is not specified, matching begins at the start of subject. Return k_STATUS_SUCCESS on success, k_STATUS_NO_MATCH if a match is not found, and another value if an error occurs. If the returned status is not k_STATUS_SUCCESS or k_STATUS_NO_MATCH it may match one of specific k_STATUS_* error return constants defined above (but is not guaranteed to). result is unchanged if a value other than k_STATUS_SUCCESS is returned. The behavior is undefined unless true == isPrepared(), subjectOffset <= subject.length(), and subject is valid UTF‐8 if pattern() was prepared with k_FLAG_UTF8.

int
matchRaw(
    std::string_view* result,
    std::string_view const& subject,
    size_t subjectOffset = 0) const;

Match subject against pattern() without UTF‐8 validation overhead, loading subpattern matches into result.

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

Same as the preceding overload, using a std::pmr::vector buffer.

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

Same as the preceding overload, using a std::vector result buffer.

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

Match the specified subject having the specified subjectLength against pattern(). Begin matching at the optionally specified subjectOffset in subject. If subjectOffset is not specified, matching begins at the start of subject. subject may contain embedded null characters. Return k_STATUS_SUCCESS on success, k_STATUS_NO_MATCH if a match is not found, and another value if an error occurs. If the returned status is not k_STATUS_SUCCESS or k_STATUS_NO_MATCH it may match one of specific k_STATUS_* error return constants defined above (but is not guaranteed to). The behavior is undefined unless true == isPrepared(), subject || 0 == subjectLength, subjectOffset <= subjectLength, and subject is valid UTF‐8 if pattern() was prepared with k_FLAG_UTF8.

int
matchRaw(
    char const* subject,
    size_t subjectLength,
    size_t subjectOffset = 0) const;

Same as the preceding overload, loading a string_view match result.

int
matchRaw(
    std::string_view* result,
    char const* subject,
    size_t subjectLength,
    size_t subjectOffset = 0) const;

Match the specified subject having the specified subjectLength against pattern(). Begin matching at the optionally specified subjectOffset in subject. If subjectOffset is not specified, matching begins at the start of subject. subject may contain embedded null characters. Return k_STATUS_SUCCESS on success, k_STATUS_NO_MATCH if a match is not found, and another value if an error occurs. If the returned status is not k_STATUS_SUCCESS or k_STATUS_NO_MATCH it may match one of specific k_STATUS_* error return constants defined above (but is not guaranteed to). result is unchanged if a value other than k_STATUS_SUCCESS is returned. The behavior is undefined unless true == isPrepared(), subject || 0 == subjectLength, subjectOffset <= subjectLength, and subject is valid UTF‐8 if pattern() was prepared with k_FLAG_UTF8.

int
matchRaw(
    bsl::pair<size_t, size_t>* result,
    char const* subject,
    size_t subjectLength,
    size_t subjectOffset = 0) const;

Same as the preceding overload, loading StringRef match results.

int
matchRaw(
    bsl::vector<bslstl::StringRef>* result,
    char const* subject,
    size_t subjectLength,
    size_t subjectOffset = 0) const;

Match the specified subject having the specified subjectLength against pattern(). Begin matching at the optionally specified subjectOffset in subject. If subjectOffset is not specified, matching begins at the start of subject. subject may contain embedded null characters. On success:

int
matchRaw(
    bsl::vector<bsl::pair<size_t, size_t>>* result,
    char const* subject,
    size_t subjectLength,
    size_t subjectOffset = 0) const;

Created with MrDocs