Merge pull request #150 from prometheus/anchor

Anchor config regexes
This commit is contained in:
Fabian Reinartz 2015-11-19 12:42:34 +01:00
commit 769275b235
2 changed files with 52 additions and 52 deletions

View File

@ -329,7 +329,7 @@ func (re *Regexp) UnmarshalYAML(unmarshal func(interface{}) error) error {
if err := unmarshal(&s); err != nil { if err := unmarshal(&s); err != nil {
return err return err
} }
regex, err := regexp.Compile(s) regex, err := regexp.Compile("^(?:" + s + ")$")
if err != nil { if err != nil {
return err return err
} }

File diff suppressed because one or more lines are too long