regex

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 2 Imported by: 1

README

Regex library

Candidate functions :

Func Name Prototype Description Comments
Find Find(pattern string, str string) string {} Returns the first match of the pattern in the string N/A
FindAll FindAll(pattern string, str string) []string {} Returns all matches of the pattern in the string N/A
FindAllIndex FindAllIndex(pattern string, str string) []int {} Returns the indexes of all matches of the pattern in the string N/A
FindIndex FindIndex(pattern string, str string) []int {} Returns the first and last index of the first match of the pattern in the string N/A
Match Match(pattern string, str string) bool {} Returns true if the pattern matches the string N/A
Replace Replace(pattern, str, new string, nb int) string {} Replaces the nb first matches of the pattern in the string with the new string N/A
ReplaceAll ReplaceAll(pattern string, str string, new string) string {} Replaces all matches of the pattern in the string with the new string N/A

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find(pattern, str string) string

Find returns the first match of the pattern in the string

func FindAll

func FindAll(pattern, str string) []string

FindAll returns all matches of the pattern in the string

func FindAllIndex

func FindAllIndex(pattern, str string) []int

FindAllIndex returns the indexes of all matches of the pattern in the string

func FindIndex

func FindIndex(pattern, str string) int

FindIndex returns the first and last index of the first match of the pattern in the string

func Match

func Match(pattern, str string) bool

Match returns true if the pattern matches the string

func Replace

func Replace(pattern, str, new string, nb int) string

Replace replaces the nb first matches of the pattern in the string with the new string

func ReplaceAll

func ReplaceAll(pattern, str, new string) string

ReplaceAll replaces all matches of the pattern in the string with the new string

Types

This section is empty.

Jump to

Keyboard shortcuts

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