The problem and logs described here come from 2.1.20041011, but I saw it from earlier binary distributions too. In the regex component, if I have a <group_variable_1><constant or variable><group_variable_2>, the result ends up being <group_variable_1><group_variable_2><constant or variable>. Here's an example instance. HTTP Request Regex for editionURL Reference name = editionURL Regular Expression = (action=")(.*\.gx)(.*changeEdition\/)([^"]+) Template = $3$${EditionID}/$4$ Match No. = 1 Default Value = null Regex for EditionID Reference name = EditionID Regular Expression = (<option value=")(\d+)("[^>\s]*>\w\w<\/option>) Template = $2$ Match No. = 0 Default Value = null Logs: 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: Pattern = org.apache.oro.text.regex.Perl5Pattern@1c0b204 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: template = $2$ 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: template split into 2 pieces, starts with = true 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: RegexExtractor processing result 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: Regex = (<option value=")(\d+)("[^>\s]*>\w\w<\/option>) 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: RegexExtractor: Match found! 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: RegexExtractor: Match found! 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: RegexExtractor: Match found! 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: RegexExtractor: Template piece #0 = 2 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: RegexExtractor: Template piece #1 = 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: RegexExtractor: Template piece #2 = 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: Regex Extractor result = 493 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: Pattern = org.apache.oro.text.regex.Perl5Pattern@1c0b204 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: template = $3$493$4$ 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: template split into 3 pieces, starts with = true 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: RegexExtractor processing result 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: Regex = (action=")(.*\.gx)(.*changeEdition\/)([^"]+) 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: RegexExtractor: Match found! 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: RegexExtractor: Template piece #0 = 3 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: RegexExtractor: Template piece #1 = 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: RegexExtractor: Template piece #2 = 4 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: RegexExtractor: Template piece #3 = 493 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: RegexExtractor: Template piece #4 = 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.extractor.RegexExtractor: Regex Extractor result = /5133460/3542940/4719119/468/1101253233790/loot/C/changeEdition/loot493/ <===== 2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG - jmeter.protocol.http.sampler.HTTPSampler: Start : samplehttp://loot:8080/g-control/gocentura.gx/5133460/3542940/4719119/468/1101253233790/loot/C/changeEdition/loot493/ In the regex for editionURL, the template is $3$${EditionID}$4$. $3$ has been evaluated to "5133460/3542940/4719119/468/1101253233790/loot/C/changeEdition/" ${EditionID} = 493 $4$ has been evaluated to "loot" But ${editionURL} ends up being: /5133460/3542940/4719119/468/1101253233790/loot/C/changeEdition/loot493/
I can confirm the bug with 2.0.2. As a possible temporary work-round, it looks as though patterns which start with a constant work OK.
Fix applied to CVS branch 2.0.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1475