reutil

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DelFirst

func DelFirst(regex, content string) (string, error)

DelFirst 删除第一个匹配到的内容

func Escape

func Escape(input string) string

Escape 转义给定字符串

func ExtractMulti

func ExtractMulti(regex, content string, template string) (string, error)

ExtractMulti 抽取多个分组并拼接

func FindAll

func FindAll(regex, content string) ([]string, error)

FindAll 查找所有匹配文本

func Get

func Get(regex, content string, groupIndex int) (string, error)

Get 获取匹配的字符串

func GetFirstNumber

func GetFirstNumber(content string) (int, error)

GetFirstNumber 找到第一个匹配的数字

func IsMatch

func IsMatch(regex, content string) (bool, error)

IsMatch 判断字符串是否匹配给定正则

func ReplaceAll

func ReplaceAll(content, regex, replacementTemplate string) (string, error)

ReplaceAll 替换所有匹配文本

Types

This section is empty.

Jump to

Keyboard shortcuts

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