This is a Fortran interface to the POSIX 1003.2 regular expression library using ISO_C_BINDING based on the example in the Fortran wiki.
It adds man-pages and an fpm(1) interface and a unit test.
Volunteers to extend it are welcome
git clone https://github.com/urbanjost/M_regex.git
cd M_regex/src
# change Makefile if not using one of the listed compilers
# for gfortran
make clean
make F90=gfortran gfortran
# for ifort
make clean
make F90=ifort ifort
# for nvfortran
make clean
make F90=nvfortran nvfortran
This will compile the Fortran module and basic example program that exercise the routine.
Alternatively, download the github repository and build it with fpm ( as described at Fortran Package Manager )
git clone https://github.com/urbanjost/M_regex.git
cd M_regex
fpm test
or just list it as a dependency in your fpm.toml project file.
[dependencies]
M_regex = { git = "https://github.com/urbanjost/M_regex.git" }
CHANGELOG provides a history of significant changes
This is a modified version of the Fortran wiki entry regex_module
https://github.com/search?q=fortran+regex
http://www.pcre.org/