func NewCompile(regexStr string) *Matcher {
	return &Matcher{
		regex: regexp.MustCompile(regexStr),
	}
}
NewCompile accepts a regex string
package matcher
import (
	"fmt"
	"regexp"
	"strings"
)
var metricLineRE = regexp.MustCompile(`^(\*\.|[^.]+\.|\.)*(\*|[^.]+)$`)
type Matcher struct {
	regex *regexp.Regexp
}
func New(rulePattern string) (*Matcher, error) {
	regex, err := getRegexp(rulePattern)
	if err != nil {
		return nil, err
	}
	m := &Matcher{
		regex: regex,
	}
	return m, nil
}