##GoVerbalExpressions
- ported from VerbalExpressions
PRE-ALPHA
Hot to use
package main
import (
"fmt"
"github.com/xaockd/verbalregex"
)
func main() {
ve := verbalregex.VerEx{}
ve.StartOfLine(true).Then(`http`).Maybe(`s`).Then(`://`).Maybe(`www.`).AnythingBut(` `).EndOfLine(true)
if ve.Test(`https://www.google.com`) {
fmt.Println(`valid url`)
} else {
fmt.Println(`invalid url`)
}
//replace
fmt.Println(ve.Clear().Find(`a(x*)b`).Replace(`-ab-axxb-`, "T")) // -T-T-
//get native regexp.Regexp
ve.GetNativeRegexp() // return *regexp.Regexp
}
You can see an up to date list of all ports on VerbalExpressions.github.io.