diff --git a/pkg/build/builder/util.go b/pkg/build/builder/util.go
index <HASH>..<HASH> 100644
--- a/pkg/build/builder/util.go
+++ b/pkg/build/builder/util.go
@@ -10,15 +10,19 @@ import (
 	stiapi "github.com/openshift/source-to-image/pkg/api"
 )
 
+var (
+	// procCGroupPattern is a regular expression that parses the entries in /proc/self/cgroup
+	procCGroupPattern = regexp.MustCompile(`\d+:([a-z_,]+):/.*/(docker-|)([a-z0-9]+).*`)
+)
+
 // readNetClsCGroup parses /proc/self/cgroup in order to determine the container id that can be used
 // the network namespace that this process is running on.
 func readNetClsCGroup(reader io.Reader) string {
 	cgroups := make(map[string]string)
 
-	re := regexp.MustCompile(`\d+:([a-z_,]+):/.*/(docker-|)([a-z0-9]+).*`)
 	scanner := bufio.NewScanner(reader)
 	for scanner.Scan() {
-		if match := re.FindStringSubmatch(scanner.Text()); match != nil {
+		if match := procCGroupPattern.FindStringSubmatch(scanner.Text()); match != nil {
 			list := strings.Split(match[1], ",")
 			containerId := match[3]
 			if len(list) > 0 {
Move the cgroup regex to package level.

Address code review comment: coding convention calls for regex
patterns to be defined as package level vars.