gitlab.com/evatix-go/core@v1.3.55/regexnew/IsMatchLock.go (about)

     1  package regexnew
     2  
     3  // IsMatchLock creates new regex using lock
     4  // and then calls match
     5  // if doesn't match or invalid regex then returns false.
     6  func IsMatchLock(regex, comparing string) bool {
     7  	regEx, _ := CreateLock(regex)
     8  
     9  	if regEx != nil && regEx.MatchString(comparing) {
    10  		return true
    11  	}
    12  
    13  	return false
    14  }