Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaeguard committed Sep 23, 2023
1 parent 8333e99 commit 1175c0f
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,30 @@

![](https://github.com/rhaeguard/rgx/actions/workflows/go.yml/badge.svg)

a very simple regex engine written in go.
A very simple regex engine written in go. This library is experimental, use it at your own risk!

## todo
### to add the dependency:

```shell
go get github.com/rhaeguard/rgx
```

### how to use:
```go
import "github.com/rhaeguard/rgx"

pattern, err := rgx.Compile(regexString)
if err != nil {
// error handling
}
results := pattern.FindMatches(content)

if results.Matches {
groupMatchString := results.Groups["group-name"]
}
```

### todo

- [x] `^` beginning of the string
- [x] `$` end of the string
Expand Down

0 comments on commit 1175c0f

Please sign in to comment.