You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Bob Meliev <b....@gmail.com> on 2014/12/29 06:28:57 UTC

Regexp match multiple empty lines

Hi,

How I can match multiple empty lines? I have response:

<th class="price"><strong id="total" class="totals">






         $304.32





</strong></th>

I need to get 304.32 but got stuck after > character. Using this pattern 
d="total" class="totals">\n

Thanks in advance.

-- 
Sincerely, Bob!


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: Regexp match multiple empty lines

Posted by UBIK LOAD PACK Support <su...@ubikloadpack.com>.
Hi,
A better way is to use:

   - CSS/JQuery Extractor
   - CSS/Jquery Expression : strong[id=total]
   - Attribute : leave it empty
   - Match No : 1


Regards
@ubikloadpack

On Mon, Dec 29, 2014 at 9:42 AM, Sergio Boso <se...@bosoconsulting.it>
wrote:

> Il 29/12/2014 06.28, Bob Meliev ha scritto:
>
>> Hi,
>>
>> How I can match multiple empty lines? I have response:
>>
>> <th class="price"><strong id="total" class="totals">
>>
>>
>>
>>
>>
>>
>>         $304.32
>>
>>
>>
>>
>>
>> </strong></th>
>>
>> I need to get 304.32 but got stuck after > character. Using this pattern
>> d="total" class="totals">\n
>>
>> Thanks in advance.
>>
>>  You have to switch to single line mode and remember to escape the '$'.
> The final result should be something like:
>
>  (?s)id="total" class="totals">.*?\$([\d\.]*)
>
> regards
>
>
>
> --
>
> Ing. Sergio Boso
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: Regexp match multiple empty lines

Posted by Sergio Boso <se...@bosoconsulting.it>.
Il 29/12/2014 06.28, Bob Meliev ha scritto:
> Hi,
>
> How I can match multiple empty lines? I have response:
>
> <th class="price"><strong id="total" class="totals">
>
>
>
>
>
>
>         $304.32
>
>
>
>
>
> </strong></th>
>
> I need to get 304.32 but got stuck after > character. Using this pattern d="total" class="totals">\n
>
> Thanks in advance.
>
You have to switch to single line mode and remember to escape the '$'. The final result should be something like:

  (?s)id="total" class="totals">.*?\$([\d\.]*)

regards



-- 

Ing. Sergio Boso




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org