From: Marcel van Lohuizen Date: Fri, 16 Sep 2011 09:28:53 +0000 (+0200) Subject: exp/norm: reverting to using strings.Repeat, as it doesn't look like exp/regexp X-Git-Tag: weekly.2011-09-21~59 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a083fd524ad83dc46552cf1f8673a7683c3edde1;p=gostls13.git exp/norm: reverting to using strings.Repeat, as it doesn't look like exp/regexp is going to support returning multiple matches for a single repeated group. R=r, rsc, mpvl CC=golang-dev https://golang.org/cl/5014045 --- diff --git a/src/pkg/exp/norm/normregtest.go b/src/pkg/exp/norm/normregtest.go index 2a0f3a65cc..b2d8b1ffd7 100644 --- a/src/pkg/exp/norm/normregtest.go +++ b/src/pkg/exp/norm/normregtest.go @@ -115,8 +115,7 @@ func (t Test) Name() string { } var partRe = regexp.MustCompile(`@Part(\d) # (.*)\n`) // TODO: using $ iso \n does not work -// TODO: the following regexp does not work: `^(?:([\dA-F ]+);){5} # (.*)\n` -var testRe = regexp.MustCompile(`^(?:([\dA-F ]+);)(?:([\dA-F ]+);)(?:([\dA-F ]+);)(?:([\dA-F ]+);)(?:([\dA-F ]+);) # (.*)\n`) +var testRe = regexp.MustCompile(`^` + strings.Repeat(`([\dA-F ]+);`, 5) + ` # (.*)\n`) var counter int