Skip to content

xAockd/VerbalExpressions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

##GoVerbalExpressions

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
}

Other Implementations

You can see an up to date list of all ports on VerbalExpressions.github.io.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages