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" }
-
A single page that uses javascript to combine all the HTML descriptions of the man-pages is at BOOK_M_regex.
-
a simple index to the man-pages in HTML form for the routines
-
There are man-pages in the repository download in the docs/ directory that may be installed on ULS (Unix-Like Systems).
-
CHANGELOG provides a history of significant changes
This is a modified version of the Fortran wiki entry regex_module
-
https://github.com/urbanjost/general-purpose-fortran
-
https://github.com/vmagnin/gtk-fortran/blob/gtk3/examples/regex.f90
-
https://fortran-lang.discourse.group/t/regular-expressions-regex-and-fortran/778
-
https://developer.gnome.org/glib/stable/glib-Perl-compatible-regular-expressions.html