jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gavin Maselino <gavinmasel...@hotmail.com>
Subject Re: Jmeter Regex advice - qualifier string after regex
Date Wed, 13 Nov 2013 19:52:32 GMT

Thanks also Deepak for your help. 

> On 13 Nov 2013, at 19:01, "Deepak Shetty" <shettyd@gmail.com> wrote:
> 
> Hi
> I guess your expression is too greedy (Im assuming you are getting a lot
> more than 12354
> 
> a href=([^>]*)><span>Foo2
> Note that your snippet is invalid html and people tend to put in quotes or
> apostrophes or add spaces or more attributes and if you want to write an
> expression that doesnt break easily youll have to change the regex.
> the other way would be to modify your expression to have .*? - that would
> work but it would be inefficient
> 
> 
> On Wed, Nov 13, 2013 at 9:11 AM, Gavin Maselino
> <gavinmaselino@hotmail.com>wrote:
> 
>> Hi
>> So here is an example of the JMeter response I am struggling with:
>> <div><a href=12354><span>Foo1<a href=12357><span>Foo2</div>
>> The text I need to use regex on is the ahref next to Foo2 (12357).When I
>> do this regex on RegexTester.com (a href=(.*)><span>Foo2), it returns the
>> href value for Foo1.
>> Can anyone advise how I can get the ahref for Foo2?
>> I cannot use XPath extraction as the real response I am using has
>> hexademical in it so a '<' is actually encoded as '\u003C'.
>> Thanks
>> 

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


Mime
View raw message