gregx

package
v0.0.0-...-c9a36a8 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

正则表达式.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMatch

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

正则表达式是否匹配

func IsMatchString

func IsMatchString(pattern string, src string) bool

func MatchAllString

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

func MatchString

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

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

func Replace

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

正则替换(全部替换)

func ReplaceString

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

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

func Validate

func Validate(pattern string) error

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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