latacora / multi-match

Match multiple regexes at once

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

com.latacora/multi-match

Match against multiple regexes simultaneously, and then tell you which one matched, without leaving the familiarity of regexes for a more sophisticated parser like instaparse or ANTLR4.

This assumes all your regexes are mutually exclusive, i.e. it will only return one match.

Installation

Download from https://github.com/latacora/multi-match

Usage

The tests are probably your best bet for now: https://github.com/latacora/multi-match/blob/main/test/com/latacora/multi_match_test.clj#L51

Development

To run tests: clj -Mtest

License

Copyright © Latacora, LLC

About

Match multiple regexes at once

License:Eclipse Public License 1.0


Languages

Language:Clojure 100.0%