regex

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

README

References

Documentation

Overview

Package regex the regexp parser

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct{}

Parser the regexp2 parser

func (Parser) GetElement

func (p Parser) GetElement(ctx *plugin.Context, content any, arg string) (string, error)

GetElement gets the element of the content with the given arguments. sames as GetString.

func (Parser) GetElements

func (p Parser) GetElements(ctx *plugin.Context, content any, arg string) ([]string, error)

GetElements gets the elements of the content with the given arguments. sames as GetStrings.

func (Parser) GetString

func (p Parser) GetString(_ *plugin.Context, content any, arg string) (string, error)

GetString gets the string of the content with the given arguments. replace the string with the given regexp.

func (Parser) GetStrings

func (p Parser) GetStrings(_ *plugin.Context, content any, arg string) ([]string, error)

GetStrings gets the strings of the content with the given arguments. replace each string of the slice with the given regexp.

Jump to

Keyboard shortcuts

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