This function checks if the given pattern is valid as a regex pattern
and compares the result to the correct_answer
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | pattern | |||
logical, | intent(in) | :: | correct_answer |
function is_valid__pattern(pattern, correct_answer) result(res) implicit none character(*), intent(in) :: pattern logical, intent(in) :: correct_answer logical :: res res = is_valid_regex(pattern) .eqv. correct_answer end function is_valid__pattern