README.md
December 22, 2022 ยท View on GitHub
Fortran interface to C POSIX regular expressions
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
BUILDING THE MODULE USING make(1)
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.
BUILD and TEST with FPM
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" }
DOCUMENTATION
USER
-
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
DEVELOPER
PEDIGREE
This is a modified version of the Fortran wiki entry regex_module
SEE ALSO
-
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



