re

package
v0.0.0-...-b1b21d8 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: LGPL-3.0 Imports: 1 Imported by: 1

README

功能概述

  • golang re 的二次封装

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Quote

func Quote(reg string) string

转义

func Split

func Split(reg string, txt string) []string

分割

func Sub

func Sub(reg string, rep string, txt string) string

替换匹配

func SubFunc

func SubFunc(reg string, rep func(string) string, txt string) string

使用方法替换匹配

Types

type ReData

type ReData struct {
	// contains filtered or unexported fields
}

func FindAll

func FindAll(reg string, txt string) []*ReData

find 所有

func Search(reg string, txt string) *ReData

搜索

func (*ReData) Group

func (obj *ReData) Group(nums ...int) string

返回分组的匹配

Jump to

Keyboard shortcuts

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