The function validating a given regex patten.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | pattern |
pure elemental function is_valid_regex_pattern (pattern) result(res) !! The function validating a given regex patten. implicit none character(*), intent(in) :: pattern logical :: res character(:), allocatable :: buff type(tree_t) :: tree buff = trim(pattern) call tree%build(buff) res = tree%is_valid_pattern end function is_valid_regex_pattern