You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by GitBox <gi...@apache.org> on 2021/09/11 10:49:14 UTC

[GitHub] [jmeter] FSchumacher commented on a change in pull request #660: bz65108: escape/unescape jmeter variable references

FSchumacher commented on a change in pull request #660:
URL: https://github.com/apache/jmeter/pull/660#discussion_r706597371



##########
File path: src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/util/GraphQLRequestParamUtils.java
##########
@@ -56,6 +55,12 @@
 
     private static final Pattern WHITESPACES_PATTERN = Pattern.compile("\\p{Space}+");
 
+    private static final Pattern JMETER_VARIABLE_REFERENCE_PATTERN = Pattern
+            .compile("(:\\s*)\\$\\{([^\\$\\{\\}]+)\\}([\\s,\\}])");

Review comment:
       The part `[^\\$\\{\\}]+` seems not correct to me. I believe, that you wanted to simulate a *negative lookahead* here.
   You probably want to match a complete variable reference like `${varname}` and not two or more like in `${var1} ${var2}`.
   What about more complex setups like `${function(${var1})}`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org