dm_regex_response_string Function

public function dm_regex_response_string(request, name, string, pattern) result(rc)

Uses

  • proc~~dm_regex_response_string~~UsesGraph proc~dm_regex_response_string dm_regex_response_string module~dm_request dm_request proc~dm_regex_response_string->module~dm_request module~dm_error dm_error module~dm_request->module~dm_error module~dm_id dm_id module~dm_request->module~dm_id module~dm_kind dm_kind module~dm_request->module~dm_kind module~dm_response dm_response module~dm_request->module~dm_response module~dm_string dm_string module~dm_request->module~dm_string module~dm_time dm_time module~dm_request->module~dm_time module~dm_util dm_util module~dm_request->module~dm_util module~dm_error->module~dm_kind module~dm_ascii dm_ascii module~dm_error->module~dm_ascii iso_fortran_env iso_fortran_env module~dm_kind->iso_fortran_env module~dm_response->module~dm_error module~dm_response->module~dm_id module~dm_response->module~dm_kind module~dm_response->module~dm_util module~dm_string->module~dm_error module~dm_string->module~dm_kind module~dm_time->module~dm_error module~dm_time->module~dm_kind module~dm_time->module~dm_util module~dm_util->module~dm_error module~dm_util->module~dm_kind

Returns response string from raw response, extracted by group name name. If pattern is passed, it is used as the regular expression pattern instead of the request pattern.

The function returns the following error codes:

  • E_EMPTY if the response string of the group is empty.
  • E_INCOMPLETE if the request contains no pattern.
  • E_INVALID if the regular expression is invalid.
  • E_REGEX if a PCRE2 library error occured.
  • E_REGEX_COMPILE if the pattern failed to compile.
  • E_REGEX_EXCEEDED if the number of matches exceeds the O vector size.
  • E_REGEX_NO_GROUP if name does not match any group.
  • E_REGEX_NO_MATCH if the pattern does not match.

On error, the group string is allocated, but may be empty.

Arguments

Type IntentOptional Attributes Name
type(request_type), intent(inout) :: request

Request type.

character(len=*), intent(in) :: name

Response name or regular expression group.

character(len=:), intent(out), allocatable :: string

String extracted from group name.

character(len=*), intent(in), optional :: pattern

Pattern to use instead of the request pattern.

Return Value integer


Calls

proc~~dm_regex_response_string~~CallsGraph proc~dm_regex_response_string dm_regex_response_string pcre2_match pcre2_match proc~dm_regex_response_string->pcre2_match pcre2_match_data_create pcre2_match_data_create proc~dm_regex_response_string->pcre2_match_data_create pcre2_match_data_free pcre2_match_data_free proc~dm_regex_response_string->pcre2_match_data_free pcre2_substring_get_byname pcre2_substring_get_byname proc~dm_regex_response_string->pcre2_substring_get_byname proc~dm_is_error dm_is_error proc~dm_regex_response_string->proc~dm_is_error proc~dm_regex_create dm_regex_create proc~dm_regex_response_string->proc~dm_regex_create proc~dm_regex_destroy dm_regex_destroy proc~dm_regex_response_string->proc~dm_regex_destroy pcre2_compile pcre2_compile proc~dm_regex_create->pcre2_compile pcre2_get_error_message pcre2_get_error_message proc~dm_regex_create->pcre2_get_error_message pcre2_code_free pcre2_code_free proc~dm_regex_destroy->pcre2_code_free