Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rosylilly/gregexp
provides convertor for Shell file grep pattern to Regexp
https://github.com/rosylilly/gregexp
golang regexp
Last synced: 8 days ago
JSON representation
provides convertor for Shell file grep pattern to Regexp
- Host: GitHub
- URL: https://github.com/rosylilly/gregexp
- Owner: rosylilly
- License: mit
- Created: 2017-09-25T04:26:00.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-25T05:16:45.000Z (over 7 years ago)
- Last Synced: 2024-12-22T13:14:53.350Z (17 days ago)
- Topics: golang, regexp
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gregexp
[![Build Status](https://travis-ci.org/rosylilly/gregexp.svg?branch=master)](https://travis-ci.org/rosylilly/gregexp)
[![Coverage Status](https://coveralls.io/repos/github/rosylilly/gregexp/badge.svg?branch=master)](https://coveralls.io/github/rosylilly/gregexp?branch=master)
[![Godoc](https://godoc.org/github.com/rosylilly/gregexp?status.svg)](https://godoc.org/github.com/rosylilly/gregexp)`gregexp` provides convertor for Shell file grep pattern to Regexp.
## Usage
```go
package mainimport (
"github.com/rosylilly/gregexp"
"fmt"
)func main() {
reg, err := gregexp.Convert("lib/**/*.go")
if err != nil {
fmt.Error(err)
}if reg.MatchString("lib/gregexp.go") {
fmt.Println("matched")
} else {
fmt.Println("not matched")
}
}
```## License
[MIT License](https://github.com/rosylilly/gregexp/blob/master/LICENSE)