improving parser regex

dev
Mzack9999 2020-11-24 19:12:14 +01:00
parent e5d4c7a6d0
commit c35b79d3f6
1 changed files with 1 additions and 1 deletions

View File

@ -202,7 +202,7 @@ func (r *BulkHTTPRequest) handleRawWithPaylods(ctx context.Context, raw, baseURL
dynamicValues := make(map[string]interface{}) dynamicValues := make(map[string]interface{})
// find all potentials tokens between {{}} // find all potentials tokens between {{}}
var re = regexp.MustCompile(`(?m)\{\{.+}}`) var re = regexp.MustCompile(`(?m)\{\{[^}]+\}\}`)
for _, match := range re.FindAllString(raw, -1) { for _, match := range re.FindAllString(raw, -1) {
// check if the match contains a dynamic variable // check if the match contains a dynamic variable
expr := generators.TrimDelimiters(match) expr := generators.TrimDelimiters(match)