Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
GerbenAaltink committed Sep 28, 2024
1 parent a66a563 commit 8939b63
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
![workflow](https://github.com/GerbenAaltink/mrex/actions/workflows/make-mrex-single-platform.yml/badge.svg)

# Rmatch
![workflow](https://github.com/GerbenAaltink/mrex/actions/workflows/make-mrex-single-platform.yml/badge.svg)

## Summary
Super minimal regex validator.

Contains 95% of common used regex syntax.
Original concept is from Rob Pike and mentioned in the book "Beautiful Code" written by Andy Oram and Greg Wilson.

## Supported functions
Support for:
- extract matched data
- . Does work in combination with greedy matching
- ^
- \+ greedy
- \* greedy
- [abc] (or). Does NOT work in combination with greedy matching
- Extracting matched data.
- ".". Match anything. Does work in combination with greedy matching.
- "^". Match must start at beginning.
- "+". Match must contain one or more of previous character. Greedy.
- "*". Match must contain zero or more of previous character. Greedy.
- "[abc]". Match one of these chars. Does NOT work in combination with greedy matching (`*+`).

## Minimal usage matching
`rmatch(char * expr, char ** str)` is the main function. It returns int[3].
Expand Down

0 comments on commit 8939b63

Please sign in to comment.