Tested in Regular Expression Tester (Firefox
Addon): "list":\[\{[^}]*,?"id":(\w+),?[^}]*

Thia Regex will get the "id" value regardless of its position in the list

Hope it helps


2013/4/12 Dzmitry_Kashlach <[email protected]>

>  Hi,
>
>     I have the following response message:
>
>
> {"message":"","cod":"200","type":"base","calctime":"","units":"internal","count":1,"list":[{"id":625144,"coord":{"lat":53.900002,"lon":27.566668},"name":"Minsk","main":{"temp":283.15,"pressure":1012,"humidity":53,"temp_min":274.8,"temp_max":283.15},"dt":1365759000,"date":"2013-04-12
>
> 09:30:00","wind":{"speed":5,"deg":160,"var_beg":130,"var_end":190,"gust":9},"clouds":{"all":0},"weather":[{"id":800,"main":"Clear","description":"Sky
> is
>
> Clear","icon":"01d"}],"sys":{"country":"BY","population":1742124},"url":"http:\/\/
> openweathermap.org\/city\/625144"}]}
>
> I need to get "id" value, which goes after "list":, e.g.
> "list":[{"id":*625144*,
>
> I've tried to use the following regex, but without success: list(\W*)(\w*)
>
> Could anyone  help?
>
> Thanks in advance.
>
>
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/Regular-expressions-need-help-tp5716676.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to