https://github.com/rosylilly/gregexp
provides convertor for Shell file grep pattern to Regexp
https://github.com/rosylilly/gregexp
golang regexp
Last synced: 5 months 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 (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-25T05:16:45.000Z (almost 8 years ago)
- Last Synced: 2025-02-13T02:55:23.372Z (5 months 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
[](https://travis-ci.org/rosylilly/gregexp)
[](https://coveralls.io/github/rosylilly/gregexp?branch=master)
[](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)