regex

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2021 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchString

func MatchString(pattern, input string) (bool, error)

MatchString returns true if current string match the pattern, false otherwise.

func Register

func Register(pattern string) (*regexp.Regexp, error)

Register creates a new regex from pattern it has not been created at least once yet.

func ReplaceAllString

func ReplaceAllString(pattern, input, repl string) (string, error)

ReplaceAllString returns a copy of input, replacing matches of the Regexp with the replacement string repl. Inside repl, $ signs are interpreted as in Expand, so for instance $1 represents the text of the first sub-match.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL