开发者

Something about regular expression

开发者 https://www.devze.com 2023-02-13 15:57 出处:网络
I am new in regular expression and seems I get lost into it. var data = [ {\"label\":\"1\",\"id\":\"31507\",\"url\":\"/rest开发者_开发技巧aurant/sr2.htm?&shopid=31507\",\"name\":\"content1\",\"la

I am new in regular expression and seems I get lost into it.

var data = [
{"label":"1","id":"31507","url":"/rest开发者_开发技巧aurant/sr2.htm?&shopid=31507","name":"content1","lat":"22.2874683487767","long":"114.14677977562","zoom":"18","photo":"//static3.openrice.com.hk/UserPhoto/photo/0/OA/004SR09CA05ACD14878033s.jpg","district":"上環","addr":"content2","phone":"content3"

If I want to get the content1, content2 and content3 in above script, what regular expression I should use to get it?

I have tried "/.","name":"(.)"/msU" to get content1, but failed.

Thanks.


use.toJSONString(); and parse watever u want see here

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号