You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Peter Peterse <pe...@peterse-uithuizen.com> on 2013/03/29 15:43:47 UTC
Regex en new lines
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');
">
<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+)',
'(.*?)','(.*?)','(.*?)'\);(.*?)(.*?)">(.*?)(.*?) (.*?)(.*?)<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
For additional commands, e-mail: user-help@jmeter.apache.org
Re: Regex en new lines
Posted by Peter Peterse <pe...@peterse-uithuizen.com>.
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 <ma...@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');
>
> ">
>
>
>
> <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+)',
> '(.*?)','(.*?)','(.*?)'\);(.*?)(.*?)">(.*?)(.*?) (.*?)(.*?)<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
> <ma...@jmeter.apache.org>
> For additional commands, e-mail: user-help@jmeter.apache.org
> <ma...@jmeter.apache.org>
>
>
Re: Regex en new lines
Posted by Deepak Shetty <sh...@gmail.com>.
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
<pe...@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');
> ">
>
> <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+)',
> '(.*?)','(.*?)','(.*?)'\);(.*?)(.*?)">(.*?)(.*?) (.*?)(.*?)<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
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>