tartrazine/regex/oniguruma.go

30 lines
530 B
Go
Raw Normal View History

//go:build oniguruma
// +build oniguruma
package regex
import (
2020-03-19 16:31:29 +00:00
rubex "github.com/go-enry/go-oniguruma"
)
const Name = Oniguruma
type EnryRegexp = *rubex.Regexp
func MustCompile(s string) EnryRegexp {
return rubex.MustCompileASCII(s)
}
// MustCompileMultiline matches in multi-line mode by default with Oniguruma.
func MustCompileMultiline(s string) EnryRegexp {
return MustCompile(s)
}
func MustCompileRuby(s string) EnryRegexp {
return MustCompile(s)
}
func QuoteMeta(s string) string {
return rubex.QuoteMeta(s)
}