regex

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Include

func Include() script.Option

Include the sys library in a script environment.

func Library

func Library() script.Library

Library prepares a new regex library for use within a script environment.

func Replace

func Replace(oldString string, pattern string, newString string) (string, error)

Replace uses the golang regex lib to replace all occurences of the pattern in the old string into the new strong.

@callable: regex.ReplaceString @param: oldString @String @param: pattern @String @param: newString @String @retval: replacedString @String @retval: err @Error

@usage: new_config = regex.replace(nginx_conf, "listen[\s]*80;", "listen 81;")

Types

This section is empty.

Jump to

Keyboard shortcuts

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