I use jMeter 5.5-Snapshot 3a74a92. I need to use result of previous Regular Expression Extractor stored in variable in next Regular Expression Extractor when both Regular Expression Extractors are under same HTTP Request. The example of fixed regexp that matches the result is:
<input type=\\"hidden\\" id=\\"def_SomeString\\" value=\\"(.*?)\\"/>
but 'SomeString' is something that is matched by previous Regular Expression Extractor and I have to use variable here. After several tries and analyzing debug output (that can be enabled by putting focus on Regular Expression Extractor then About->Enable Debug, do not forget to disable it later) I found that below regexp properly interprets variable and substitutes it:
<input type=\\\\"hidden\\\\" id=\\\\"def_${myVar}\\\\" value=\\\\"(.*?)\\\\"/>
Why in second expression with variable used all backslashes must be extra escaped in such weird way to match? Looks like using variable requires to use '\\\\"'
to match '\"'
which is unclear for me. Where in the documentation description of such usage can be found? I can't see anything about it there.