dm_regex_group Function

public function dm_regex_group(regex, subject, name, value) result(rc)

Returns group value in given subject from compiled regular expression.

The functions returns the following error codes:

  • E_NULL if regular expression context is not associated.
  • E_REGEX if a PCRE2 library error occured.
  • E_REGEX_EXCEEDED if the number of matches exceeds the O vector size.
  • E_REGEX_NO_GROUP if no group matches.
  • E_REGEX_NO_MATCH if the pattern does not match.

Arguments

Type IntentOptional Attributes Name
type(regex_type), intent(inout) :: regex

Regular expression type.

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

Input string.

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

Group name.

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

Group value.

Return Value integer


Calls

proc~~dm_regex_group~~CallsGraph proc~dm_regex_group dm_regex_group pcre2_match pcre2_match proc~dm_regex_group->pcre2_match pcre2_match_data_create pcre2_match_data_create proc~dm_regex_group->pcre2_match_data_create pcre2_match_data_free pcre2_match_data_free proc~dm_regex_group->pcre2_match_data_free pcre2_substring_get_byname pcre2_substring_get_byname proc~dm_regex_group->pcre2_substring_get_byname