Skip to content

Commit

Permalink
following the posix standards
Browse files Browse the repository at this point in the history
see shell section of IEEE POSIX P1003.2/ISO 9945.2
  • Loading branch information
malud committed Jul 16, 2017
1 parent 46d28e9 commit dc043db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion temgo/temgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import (

type EnvVars map[string]string

var templatePattern = regexp.MustCompile("{{\\s([A-Z_0-9]*?)\\s}}")
// following the posix standards
var templatePattern = regexp.MustCompile(`\{{2} ([a-zA-Z_]+[a-zA-Z_0-9]*) }{2}`)

func ContainsVariable(str []byte) bool {
return templatePattern.Match(str)
Expand Down

0 comments on commit dc043db

Please sign in to comment.