/multi-match

Match multiple regexes at once

Primary LanguageClojureEclipse Public License 1.0EPL-1.0

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