regexpx

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

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

Compile 根据pattern生成对应的regexp正则对象

func FindAllMatchString

func FindAllMatchString(pattern string, src string) ([][]string, error)

FindAllMatchString 正则匹配,并返回所有匹配的列表

func FindMatchString

func FindMatchString(pattern string, src string) ([]string, error)

FindMatchString 正则匹配,并返回匹配的列表

func IsMatch

func IsMatch(pattern string, src []byte) bool

IsMatch 正则表达式是否匹配

func IsMatchString

func IsMatchString(pattern string, src string) bool

IsMatchString 正则表达式是否匹配

func Replace

func Replace(pattern string, src []byte, replace []byte) ([]byte, error)

Replace 正则替换(全部替换)

func ReplaceString

func ReplaceString(pattern, src string, replace string) (string, error)

ReplaceString 正则替换(全部替换),字符串

func Validate

func Validate(pattern string) error

Validate 校验所给定的正则表达式是否符合规范

Types

This section is empty.

Jump to

Keyboard shortcuts

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