__escapeOroRegexpChars function, accroding to my observations during the work with jmeter and also according to jmeter's source code, trims leading and trailing whitespaces, which was a total surprise for me. For example, if I use ${__escapeOroRegexpChars(${SOME_VARIABLE})} in a response assertion (where SOME_VARIABLE could contain _important_ leading/trailing whitespaces), this behaviour results in inexact matches, or a failed match, if I prepend or append this assertion with some text, e.g. some_text${__escapeOroRegexpChars(${SOME_VARIABLE})}. If this behaviour is correct and is not a subject to changes, at least it could've been mentioned in the documentation (in fact, in this case I am more dissatisfied with the fact that the documentation misses this point, rather than with the behaviour itself; trimming is mentioned in the header of the "Functions reference" section http://jmeter.apache.org/usermanual/functions.html, but it regards variable names only).
Not sure why it was coded like this, but the function does trim both the value and the variable name (if provided). I suspect only the variable name should be trimmed.
I don't remember why I made the trim on value, anyway I think it should be fixed with a mention in changes.html.
Date: Tue Jul 30 19:42:13 2013 New Revision: 1508589 URL: http://svn.apache.org/r1508589 Log: Bug 55328 - __escapeOroRegexpChars trims spaces Bugzilla Id: 55328 Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/EscapeOroRegexpChars.java jmeter/trunk/xdocs/changes.xml
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3175