regexnew

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WhitespaceFinderRegex             = NewMust(regconsts.AllWhitespaces)
	HashCommentWithSpaceOptionalRegex = NewMust(regconsts.HashCommentWithSpaceOptional)
	WhitespaceOrPipeFinderRegex       = NewMust(regconsts.AllWhitespacesOrPipe)
	DollarIdentifierRegex             = NewMust(regconsts.EachWordsWithDollarSymbolDefinition)
	PercentIdentifierRegex            = NewMust(regconsts.EachWordsWithinPercentSymbolDefinition)
)

Functions

func New

func New(regularExpressionSyntax string) (*regexp.Regexp, error)

New creates regex if not already exist in dictionary.

if any error then doesn't save to map and returns the error

func NewLock

func NewLock(regularExpressionSyntax string) (*regexp.Regexp, error)

NewLock calls New with mutex lock and unlock.

func NewLockIf added in v0.6.9

func NewLockIf(isLock bool, regularExpressionSyntax string) (*regexp.Regexp, error)

NewLockIf calls New with mutex lock and unlock if true.

func NewMust

func NewMust(regularExpressionSyntax string) *regexp.Regexp

NewMust creates regex if not already exist in dictionary.

if any error then panics

func NewMustLock

func NewMustLock(regularExpressionSyntax string) *regexp.Regexp

func NewMustLockIf added in v0.6.9

func NewMustLockIf(
	isLock bool,
	regularExpressionSyntax string,
) *regexp.Regexp

Types

This section is empty.

Jump to

Keyboard shortcuts

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