jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Lloyd <oliver_ll...@hotmail.com>
Subject Re: Regural expression is not returning the values correctly.
Date Wed, 16 Nov 2011 16:25:41 GMT
You have to escape any meta chars. Like this:

"id": "([^"]+)","style": "link","icon":
"theme:\\\/\\\/\.\.\\\/\.\.\\\/images\\\/showRelation\.jpg\\t","v":{"state":false}}],"Sanjay"

This will return PID236 when using Sanjay and PID238 when using Pandey. But
that's messy, you should try to make the regexp more reliable, like this:

"id":\s"([^"]+)","style":\s"link","icon":\s"theme:[^"]+","[a-z]":{"state":false}}],"Sanjay"

But it all depends on your specific data and how it changes. Only you can
know the best approach.

Finally, if you want 235 & 237 use

\["[^"]+",{"id":
"([^"]+)","type":\s"switch","[a-z]":{"state":false}}\],\["[^"]+",{"id":\s"[^"]+","style":\s"link","icon":\s"theme:[^"]+","[a-z]":{"state":false}}\],"Sanjay"

-----
http://www.http503.com/
--
View this message in context: http://jmeter.512774.n5.nabble.com/Regural-expression-is-not-returning-the-values-correctly-tp4997802p4998271.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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


Mime
View raw message