[UP]


Manual Reference Pages  - regfree (3)

NAME

regfree(3f) - [M_regex] Release storage used by the internal form of the RE (Regular Expression)

CONTENTS

Synopsis
Description
Options
Example

SYNOPSIS

subroutine regfree(this)

     type(regex_type), intent(inout) :: this

DESCRIPTION

regfree(3f) frees any dynamically-allocated storage used by the internal form of an RE.

The regfree(3f) function frees any dynamically-allocated storage associated with the compiled RE pointed to by THIS. The remaining regex_type is no longer a valid compiled RE and the effect of supplying it to regexec() or regerror() is undefined.

OPTIONS

THIS a compiled regular expression previously allocated using regcomp(3f).

EXAMPLE

Sample program

   program demo_regfree
   use M_regex, only: regex_type, regcomp, regexec, regmatch, regfree, regerror
   type(regex_type)             :: regex
   character(len=:),allocatable :: expression
      expression= "([0-9\.\-\*\/]+)+"
      call regcomp(regex,expression,’x’)
      if (istat/=0) then
        stop ’Regex runtime error: regcomp failed.’
      endif
      call regfree(regex)
   end program demo_regfree


regfree (3) March 11, 2021
Generated by manServer 1.08 from 34f2ab2d-33ef-4e50-85a6-779b4c4028cf using man macros.