jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Peterse <pe...@peterse-uithuizen.com>
Subject Re: Regex en new lines
Date Sat, 30 Mar 2013 07:31:22 GMT
Hello Deepak,

thanks al lot for you help. I create the next regex:
(?s)(<div style="width:100%; height:100%;" id="([^"]*)" class="([^"]*)"
onclick="(([^g]*))guestFieldOnOff\('(\d+)',
'([^']*)','([^']*)','([^']*)'\);([^a]*)an
class="guestfield_id_of_source">([^<]*)</span>)

And this one worked.

Regards,
Peter

Op 29-3-2013 22:14, Deepak Shetty schreef:
> Try replacing id="(.*?)" with something like id="([^"]*)" - which you
> need to do for all the sub types where you use .*? the former type is
> nefficient so it might be causing your  regex to slow
>
>
> On Fri, Mar 29, 2013 at 7:43 AM, Peter Peterse
> <peter@peterse-uithuizen.com <mailto:peter@peterse-uithuizen.com>> wrote:
>
>     Hello all,
>
>     I have a question about regular expresions and newlines. I have
>     the next
>     part in my result:
>     ==================
>     <div style="width:100%; height:100%;" id="sourcefield-5251"
>     class="is_no_sourcefield" onclick="
>                                                                      
>       guestFieldOnOff('5251',
>     'C5FBDD23BD31S84D2CA4_nrm','general','true');
>                                                                      
>         ">
>                                                                      
>     &nbsp;
>                                                                      
>     <span
>     class="guestfield_id_of_source"></span>
>     </div>
>     ==================
>
>
>     I've used the next regex but this is not the right one:
>     (?s)(<div style="width:100%; height:100%;" id="(.*?)" class="(.*?)"
>     onclick="(.*?)guestFieldOnOff\('(\d+)',
>     '(.*?)','(.*?)','(.*?)'\);(.*?)(.*?)">(.*?)(.*?)&nbsp;(.*?)(.*?)<span
>     class="guestfield_id_of_source">(\d+)</span>(.*?)</div>)
>
>     JMeter will freeze after I want to use the regex
>
>     I hope someone know that I did wrong and will help me with that ;-)
>
>     Regards,
>     Peter
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>     <mailto:user-unsubscribe@jmeter.apache.org>
>     For additional commands, e-mail: user-help@jmeter.apache.org
>     <mailto:user-help@jmeter.apache.org>
>
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message