I can only answer this for the upcoming 1.9 release (which I'm doing right this
second...)
If you are using the '$' character in a character class, then it doesn't need to be
escaped for
the regex (ie, if you use it withing square brackets).
If you are using the '$' as a literal outside of a character class, then the regular
expression will
require it be escaped - ie '\$'
However, JMeter requires that '\' be escaped, thus you'd have to use '\\$'.
To get really complicated on you (and you can probably safely ignore this), if you
wanted
something like '${2,3}', then you would have to escape the '$' for JMeter as well (in
addition to
escaping it for the regex), thus you would need '\\\$', which is '\\' + '\$'.
On top of all this, your chosen regular expression: 'contractHandle=([$].*)">' is
likely to cause
you problems, since '.*' will match as much as possible until the last "> is found on
the page,
which, odds are, will be quite a bit. Btetter, would be 'contractHandle=([$][^"]*)">'
-Mike
On 6 Aug 2003 at 11:03, cecilia wrote:
>
> I am new to JMeter, and I have read the user manual and searched for
> answer on Internet, so far I haven't found anyway to get my problem
> solved. I would really appreciate any input here.
>
>
> I am trying to extract a value string which contains a '$' from a
> response of HTTP Request. The response data is something like:
>
> <a
> href="contract.terms.ViewTermDetails.do?init=true&contractHandle=$7.301e
> ">
>
>
> I wanted to extract the value of contractHandle --- $7.301e, and use
> them as parameter/value to be passed in my next HTTP Request
>
> http://localhost:7001/opal/contract.terms.ViewTermDetails.do?init=true&&
> contractHandle=$7.301e
>
> My Regular Expression Extractor that I added in the first HTTP Request
> is like:
>
> Regular Expression: contractHandle=([$].*)"> --- I also tried
> with contractHandle=(.*)">, and did not make difference
> Template is: $1$
> Match No is: 1
> Reference Name: contractHandle
> Default: contractHandleDidNotMatch
>
> I am using the reference in the next HTTP Request parameter list:
>
> Name: contractHandle
> Value: ${contractHandle}
>
> But what I got in the next request data is:
>
> http://localhost:7001/opal/contract.terms.ViewTermDetails.do?init=true
> <http://localhost:7001/opal/contract.terms.ViewTermDetails.do?init=true&
> contractHandle=%247.301e> &contractHandle=%247.301e
>
> It looks like that somehow the literal '$' became '%24'. I did not get
> the failed value, so I assume the regular expression is ok.
>
> How can I keep the '$' in the value I extracted? Any help would be
> appreciated.
>
> -Cecilia
>
--
Michael Stover
[EMAIL PROTECTED]
Yahoo IM: mstover_ya
ICQ: 152975688
AIM: mstover777