Skip to content

Commit

Permalink
Update the variable template/replacement regex to match any non-space…
Browse files Browse the repository at this point in the history
… characters to support all types of variable replacements (#24)
  • Loading branch information
kkajla12 authored Apr 17, 2023
1 parent 0006320 commit 7cbbd40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func (suite TestSuite) executeTest(test TestSpec, extractedFields map[string]str

// Replace any template variables in test's request url with the appropriate value
requestUrl := test.Request.Url
templateVariableRegex := regexp.MustCompile(`{{\s*[a-zA-Z0-9\.]+\s*}}`)
templateVariableRegex := regexp.MustCompile(`{{\s*[^\s]+\s*}}`)
templateVariables := templateVariableRegex.FindAll([]byte(requestUrl), -1)
for _, templateVariable := range templateVariables {
templateVal := getTemplateValIfPresent(string(templateVariable), extractedFields)
Expand Down

0 comments on commit 7cbbd40

Please sign in to comment.