亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

Chinaunix

標(biāo)題: 用正則 split (/,/, $str) 如何不匹配引號(hào)中的逗號(hào) [打印本頁(yè)]

作者: david_95    時(shí)間: 2016-06-13 12:03
標(biāo)題: 用正則 split (/,/, $str) 如何不匹配引號(hào)中的逗號(hào)
有下面的字符串
store_locale_name:"CN",store_gl_code:"194",store_gl_desc:"gl_beauty",store_redirect_url:"",store_node_id:"1522674071",store_root_node_id_code:"746776051",store_type:"brand",store_name1:"PROYA 珀萊雅,旗艦店",store_estimated_setup_time:"2016-03-30 11:40:54",store_is_new:false,store_is_paid:false,store_status:"",store_contractId:"",store_is_valid:true,store_pc_enable:true,store_mobile_enable:false,store_is_ags:0,store_priority:0,store_rich_content:"",store_extra_info:"",store_comments:"",store_sm:"",store_logo_url:""

我直接用split (/,/ $mystr) 分解成數(shù)組

但是有個(gè) store_name1:" xx,xx" ,其中包含,

我怎么寫(xiě)split ,才能不讓引號(hào)中的, 被拆分?
作者: sunzhiguolu    時(shí)間: 2016-06-13 12:36
本帖最后由 sunzhiguolu 于 2016-06-13 12:41 編輯

回復(fù) 1# david_95
split (/,(?=[a-z])/);

   
作者: sunzhiguolu    時(shí)間: 2016-06-13 12:37
本帖最后由 sunzhiguolu 于 2016-06-13 12:46 編輯

這網(wǎng)絡(luò)太給力了!!!???

   
作者: sunzhiguolu    時(shí)間: 2016-06-13 12:37
本帖最后由 sunzhiguolu 于 2016-06-13 12:46 編輯

這網(wǎng)絡(luò)太給力了!!!???



   
作者: sunzhiguolu    時(shí)間: 2016-06-13 12:37
本帖最后由 sunzhiguolu 于 2016-06-13 12:47 編輯

這網(wǎng)絡(luò)太給力了!!!???



   
作者: david_95    時(shí)間: 2016-06-13 13:33
多謝,向前查找啊,我咋沒(méi)想到呢
作者: jason680    時(shí)間: 2016-06-13 16:42
回復(fù) 1# david_95

Text::CSV
   
作者: 104359176    時(shí)間: 2016-06-13 21:04
匹配規(guī)則中的例外,應(yīng)當(dāng)首先識(shí)別出來(lái),從例外中查看和一般規(guī)則的區(qū)別,會(huì)讓問(wèn)題更加復(fù)雜。

作者: sunzhiguolu    時(shí)間: 2016-06-13 22:31
回復(fù) 8# 104359176
大神能否舉例一試,

   
作者: RE_HASH    時(shí)間: 2016-06-13 22:51
json data, use a parser.




歡迎光臨 Chinaunix (http://72891.cn/) Powered by Discuz! X3.2