{"id":18854403,"url":"https://github.com/urbanjost/m_match","last_synced_at":"2026-01-24T09:32:39.203Z","repository":{"id":117558154,"uuid":"230195996","full_name":"urbanjost/M_match","owner":"urbanjost","description":"subset of Regular Expressions implemented in Fortran","archived":false,"fork":false,"pushed_at":"2025-07-11T02:28:11.000Z","size":1893,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T05:52:54.081Z","etag":null,"topics":["bre","fortran","fortran-package-manager","regex","regular-expressions"],"latest_commit_sha":null,"homepage":"","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/urbanjost.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-12-26T04:41:58.000Z","updated_at":"2025-07-11T00:09:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"5ca6698f-014c-48d9-a92b-6d5311e7c0a8","html_url":"https://github.com/urbanjost/M_match","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/urbanjost/M_match","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbanjost%2FM_match","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbanjost%2FM_match/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbanjost%2FM_match/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbanjost%2FM_match/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/urbanjost","download_url":"https://codeload.github.com/urbanjost/M_match/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbanjost%2FM_match/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28723234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T08:27:05.734Z","status":"ssl_error","status_checked_at":"2026-01-24T08:27:01.197Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bre","fortran","fortran-package-manager","regex","regular-expressions"],"created_at":"2024-11-08T03:48:07.743Z","updated_at":"2026-01-24T09:32:39.198Z","avatar_url":"https://github.com/urbanjost.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ![M_match](docs/images/regex.gif)\n\n# M_match\nsubset of Regular Expressions implemented in Fortran\n\nA basic implementation in Fortran of a subset of regular expressions as\ndescribed in \"Software Tools\" by Kernighan and Plauger, 1976.\n\nThe original used different metacharacters than are commonly used today.\n\n    \u003e ORIG. NOW\n    \u003e ?      .  any single character\n    \u003e *         any number (including zero) of repeats of previous character\n    \u003e %      ^  beginning of line\n    \u003e $         end of line\n    \u003e @      \\  escape next metacharacter\n    \u003e []        a set of characters. In a set of characters\n    \u003e           -  specifies a range of characters in a set of characters.\n                   Must be subsets of a-z, A-Z, or 0-9\n    \u003e           ^  negates the set if the first character inside a set of characters.\n\nThis code functions, but a more complete (by todays' expectations)\npure-Fortran implementation is planned.\n\nIt is hoped this particular module will be useful primarily because it\nis a native implementation in Fortran, albeit it is not as optimized or\nas feature-rich as several common regex C libraries that, when available,\ncan be accessed via an ISO_C_BINDING in modern Fortran compilers.\n\n```bash\n    git clone https://github.com/urbanjost/M_match.git\n    cd M_calculator/src\n    # change Makefile if not using one of the listed compilers\n     \n    # for gfortran\n    make clean\n    make F90=gfortran gfortran\n     \n    # for ifort\n    make clean\n    make F90=ifort ifort\n\n    # for nvfortran\n    make clean\n    make F90=nvfortran nvfortran\n\n    # run simple example program\n    PROGRAMS/findchange '%!' \u003cM_match.f90\n```\n\nA simple example that creates a grep(1)-like filter program:\n\n```fortran\nprogram demo_m_match\nuse M_match,   only : getpat, match, regex_pattern\nuse M_match,   only : YES, NO, ERR\nimplicit none\ncharacter(len=1024) :: line='', argument=''\ntype(regex_pattern) :: p\ninteger             :: ios\n   call get_command_argument(1,argument)\n   if(argument.eq.'')stop 'missing regular expression'\n   if (getpat(trim(argument), p%pat) .eq. ERR) then\n      stop '*M_match* Illegal pattern.'\n   endif\n   INFINITE: do\n      read(*,'(a)',iostat=ios)line\n      if(ios.ne.0)exit INFINITE\n      if (match(trim(line)//char(10), p%pat) .eq. YES) then\n         write(*,'(*(g0,1x))')trim(line)\n      endif\n   enddo INFINITE\nend program demo_m_match\n```\n## SUPPORTS FPM ![fpm](docs/images/fpm_logo.gif)\n\n   Alternatively, download the github repository and build it with\n   fpm ( as described at [Fortran Package Manager](https://github.com/fortran-lang/fpm) )\n\n   ```bash\n        git clone https://github.com/urbanjost/M_match.git\n        cd M_match\n        fpm build\n        fpm test\n   ```\n\n   or just list it as a dependency in your fpm.toml project file.\n\n```toml\n        [dependencies]\n        M_match        = { git = \"https://github.com/urbanjost/M_match.git\" }\n```\n\n## DOCUMENTATION   ![docs](docs/images/docs.gif)\n\n### USER\n   - A single page that uses javascript to combine all the HTML\n     descriptions of the man-pages is at \n     [BOOK_M_match](https://urbanjost.github.io/M_match/BOOK_M_match.html).\n\n   - a simple index to the man-pages in HTML form for the\n   [routines](https://urbanjost.github.io/M_match/man3.html) \n\n   - There are man-pages in the repository download in the docs/ directory\n     that may be installed on ULS (Unix-Like Systems).\n\n   - ![man-pages](docs/images/manpages.gif)\n      + [manpages.zip](https://urbanjost.github.io/M_match/manpages.zip)\n      + [manpages.tgz](https://urbanjost.github.io/M_match/manpages.tgz)\n\n   - [CHANGELOG](docs/CHANGELOG.md) provides a history of significant changes\n\n### DEVELOPER\n   - [ford(1) output](https://urbanjost.github.io/M_match/fpm-ford/index.html).\n\u003c!--\n   - [doxygen(1) output](https://urbanjost.github.io/M_match/doxygen_out/html/index.html).\n--\u003e\n   - [github action status](docs/STATUS.md) \n---\n\n\n## PASSES TESTS\n```text\nSat Dec  5 01:26:24 EST 2020\n\nGNU Fortran (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)\nCopyright (C) 2018 Free Software Foundation, Inc.\n\nifort (IFORT) 19.1.3.304 20200925\nCopyright (C) 1985-2020 Intel Corporation.  All rights reserved.\n\nnvfortran 20.7-0 LLVM 64-bit target on x86-64 Linux -tp nehalem \nNVIDIA Compilers and Tools\nCopyright (c) 2020, NVIDIA CORPORATION.  All rights reserved.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furbanjost%2Fm_match","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Furbanjost%2Fm_match","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furbanjost%2Fm_match/lists"}