mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-05-15 16:49:31 -03:00
git-subtree-dir: go-enry git-subtree-split: 7e3a9a7241b14559854ad041e73d5203a6d3272c
30 lines
530 B
Go
30 lines
530 B
Go
//go:build oniguruma
|
|
// +build oniguruma
|
|
|
|
package regex
|
|
|
|
import (
|
|
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)
|
|
}
|