regex_match_test.go 240 B

12345678910111213
  1. package match
  2. import (
  3. "fmt"
  4. "github.com/dlclark/regexp2"
  5. "testing"
  6. )
  7. func TestRegexMatch_Match(t *testing.T) {
  8. re := regexp2.MustCompile("^(?!.*abc\\.com).*", 0)
  9. match, err := re.MatchString("aa@abc.com")
  10. fmt.Println(match, err)
  11. }