On 28/05/06, Harinath Mallepally <[EMAIL PROTECTED]> wrote:
I used regular expression extractor to process a response data (to
re-use the hidden fields in the next request). It is working fine. But
for each hidden field I am using a regular expression extractor.

Is this the right way of doing it? Or is it possible to use single
regular expression extractor for multiple regular expression evaluation?

It is certainly one way of doing it; whether it is "right" or not
depends on what correctness criteria you want to apply...

A single Extractor can set multiple different variables - for the
template, for each group in the RE and for each match (if MatchNo <
0).

So in theory you can set up the variables to contain the various
different parts of the response. In practise, this may be easy, hard,
or impossible - that depends on how regular the response is.

If you want to match something like

VAR1="nnn"   VAR2="mmm"  VAR3="ppp"

you can use the RE

VAR1="(.+?)"\s+VAR2="(.+?)"\s+VAR3="(.+?)"

and the values

nnn
mmm
ppp

will be stored in

REFNAME_g1
REFNAME_g2
REFNAME_g3

respectively.

If the items you want to extract always appear in the same order, and
are always identified by the same surrounding text, then it should be
easy to extract the information in a single RE.

Otherwise, it may be difficult or impossible to achieve with a single RE.

S

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to