Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nitely/nim-regex
Pure Nim regex engine. Guarantees linear time matching
https://github.com/nitely/nim-regex
nim nim-lang nim-regex regex regex-engine regular-expressions
Last synced: 28 days ago
JSON representation
Pure Nim regex engine. Guarantees linear time matching
- Host: GitHub
- URL: https://github.com/nitely/nim-regex
- Owner: nitely
- License: mit
- Created: 2018-01-12T20:22:32.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-26T13:22:28.000Z (4 months ago)
- Last Synced: 2024-08-04T01:15:35.173Z (3 months ago)
- Topics: nim, nim-lang, nim-regex, regex, regex-engine, regular-expressions
- Language: Nim
- Homepage: https://nitely.github.io/nim-regex/
- Size: 2.99 MB
- Stars: 225
- Watchers: 9
- Forks: 20
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-nim - regex - Pure Nim regex engine with linear time match. (Language Features / Pattern Matching)
README
# Regex
[![Build Status](https://img.shields.io/github/actions/workflow/status/nitely/nim-regex/ci.yml?style=flat-square)](https://github.com/nitely/nim-regex/actions?query=workflow%3ACI)
[![licence](https://img.shields.io/github/license/nitely/nim-regex.svg?style=flat-square)](https://raw.githubusercontent.com/nitely/nim-regex/master/LICENSE)A library for parsing, compiling, and executing regular expressions at both runtime and compile-time.
Features:
* The match time is linear in the length of the input string
* Supports compiling regex at compile-time
* Supports matching at compile-time
* Unicode level-1 support
* Descriptive error messages
* PCRE syntax and semantics## Install
```
nimble install regex
```# Compatibility
Nim +1.6.0
## Docs
[Read the docs](https://nitely.github.io/nim-regex/)
## Tests
```
nimble test
```## Debugging
Compile with `-d:regexDotDir:.` to generate [dot files](https://en.wikipedia.org/wiki/DOT_(graph_description_language)) of the regexes (NFAs) within the nim file. A dot file can be viewed in [Graphviz](https://dreampuf.github.io/GraphvizOnline/). Requires Nim +1.2.
## LICENSE
MIT