Hello,
Try this regexp :
<option value="([^"]+)">([^<]+)
$1$ ==> number (1 to 20)
$2$ ==> value (if need)
Milamber
Le 29/11/2010 23:00, Michele Mase' a ecrit :
> I use a regular expression extractor to capture all the values between
> the "" in the "option value" field (all of them are numbers, in this
> case between 1 and 20)
>
>
> Text to manipulate:
> name="VB_idCprel"><option selected value="0"></option><option
> value="1">C. LUPPA 5</option><option value="2">C.LONGI M.RE
> 1</option><option value="3">CUMPNOL/VILAN 2</option><option
> value="4">CUMPINOGUPA 3</option><option value="5">DELO
> 1</option><option value="6">DELO VABBHIO 1</option><option
> value="7">FAELXO 2</option><option value="8">GHSSA' 1</option><option
> value="9">GWNA DELE 4</option><option value="10">GYNA MARUIT
> 2</option><option value="11">ZWRTAFFAGO 1</option><option
> value="12">ZWRTAFFAGO 2</option><option value="13">CITHNO
> 1</option><option value="14">CITHNO 2</option><option value="15">QOSLE
> 1</option><option value="16">TIAZILA 1</option><option
> value="17">WPFNEA 1</option><option value="18">WPFNEA
> 2</option><option value="19">ATRT' 1</option><option
> value="20">DICOWOJO 1</option>
>
> I tried with the following regular expression extractor:
> reference name: selection
> regular expression: name="VB_idCprel"><option selected
> value="0"></option>(<option value="([0-9]{1,2})">[A-Z0-9\.
> \'\/]{6,15}</option>)+
> template: $2$
> match no. 0 (i need a random value between 1 and 20)
> default value: dummy
>
>
> Match the characters "name="VB_idCprel"><option selected
> value="0"></option>" literally
> Match the regex below and capture its match into backreference 1
> (<option value="([0-9]{1,2}){1,}">[A-Z0-9\. \'\/]{6,15}</option>)
> Match the regex below and capture its match into backreference 2
> ([0-9]{1,2})
>
> But repeating the capturing group 1 itself, it causes the group will
> capture only the last iteraction. I should put a capturing group
> around the repeated group to capture all iterations.
>
> So the n.th http request (get ${selection}.html gives me the value 20
> (get 20.html)
>
> Any suggestion????
>
> Michele Masè
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]