Skip to content

An extension of standard package regexp. It contains a set of regular expression patterns and methods for matching.

License

Notifications You must be signed in to change notification settings

sugarme/regexpset

Repository files navigation

regexpset LicenseGo.Dev referenceTravisCIGo Report Card

What is it?

regexpset is an extension to Go standard library regexp. It contains a set of regular expression patterns and provides methods for matching on input string.

Basic example

    
    import "github.com/sugarme/regexpset"

    func main(){
        var patterns []string = []string{
            `\w+`,
            `\d+`,
            `\pL+`,
            `foo`,
            `bar`,
            `barfoo`,
            `foobar`,
        }

        set, err := regexpset.NewRegexpSet(patterns)
        if err != nil {
            log.Fatal(err)
        }

        setmatches := set.Matches("foobar")

        fmt.Println(setmatches.Matches())

        // [0 1 2 3 4 6]
    }
   

Documentation

See Go.Dev Reference

License: Apache 2.0

About

An extension of standard package regexp. It contains a set of regular expression patterns and methods for matching.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages