Documentation
¶
Index ¶
- Variables
- func IsMatchFailed(regex, comparing string) bool
- func IsMatchLock(regex, comparing string) bool
- func MatchError(regex, comparing string) error
- func MatchErrorLock(regex, comparing string) error
- func MatchUsingCustomizeErrorFuncLock(regexPattern, comparing string, matchFunc RegexValidationFunc, ...) error
- func MatchUsingFuncErrorLock(regexPattern, comparing string, matchFunc RegexValidationFunc) error
- func New(regularExpressionPattern string) (*regexp.Regexp, error)
- func NewLock(regularExpressionPattern string) (*regexp.Regexp, error)
- func NewLockIf(isLock bool, regularExpressionSyntax string) (*regexp.Regexp, error)
- func NewMust(regularExpressionSyntax string) *regexp.Regexp
- func NewMustLock(regularExpressionSyntax string) *regexp.Regexp
- func NewMustLockIf(isLock bool, regularExpressionSyntax string) *regexp.Regexp
- type CustomizeErr
- type RegexValidationFunc
Constants ¶
This section is empty.
Variables ¶
var ( WhitespaceFinderRegex = NewMust(regconsts.AllWhitespaces) HashCommentWithSpaceOptionalRegex = NewMust(regconsts.HashCommentWithSpaceOptional) WhitespaceOrPipeFinderRegex = NewMust(regconsts.AllWhitespacesOrPipe) DollarIdentifierRegex = NewMust(regconsts.EachWordsWithDollarSymbolDefinition) PercentIdentifierRegex = NewMust(regconsts.EachWordsWithinPercentSymbolDefinition) )
Functions ¶
func IsMatchFailed ¶ added in v0.8.0
IsMatchFailed creates new regex using lock and then calls match if doesn't match returns true
func IsMatchLock ¶ added in v0.7.6
IsMatchLock creates new regex using lock and then calls match if doesn't match or invalid regex then returns false.
func MatchError ¶ added in v0.9.5
MatchError
creates new regex using without lock (use in vars) and then calls match. On condition mismatch returns error or else nil
func MatchErrorLock ¶ added in v0.7.6
MatchErrorLock
creates new regex using lock and then calls match. On condition mismatch returns error or else nil
func MatchUsingCustomizeErrorFuncLock ¶ added in v0.9.5
func MatchUsingCustomizeErrorFuncLock( regexPattern, comparing string, matchFunc RegexValidationFunc, customizeErrFunc CustomizeErr, ) error
MatchUsingCustomizeErrorFuncLock
creates new regex using lock and then calls match. On condition mismatch returns error or else nil
func MatchUsingFuncErrorLock ¶ added in v0.9.5
func MatchUsingFuncErrorLock( regexPattern, comparing string, matchFunc RegexValidationFunc, ) error
MatchUsingFuncErrorLock
creates new regex using lock and then calls match. On condition mismatch returns error or else nil
func New ¶
New creates regex if not already exist in dictionary.
if any error then doesn't save to map and returns the error