github.com/hairyhenderson/gomplate/v4@v4.0.0-pre-2.0.20240520121557-362f058f0c93/internal/tests/integration/regexp_test.go (about) 1 package integration 2 3 import ( 4 "testing" 5 ) 6 7 func TestRegexp_Replace(t *testing.T) { 8 inOutTest(t, `{{ "1.2.3-59" | regexp.Replace "-([0-9]*)" ".$1" }}`, "1.2.3.59") 9 } 10 11 func TestRegexp_QuoteMeta(t *testing.T) { 12 inOutTest(t, "{{ regexp.QuoteMeta `foo{(\\` }}", `foo\{\(\\`) 13 }