正则表达式例子1
reg:
(/"/w.*/"[:]/"/w.*/")|(/"/w.*/"[:]/[/w.*/])
source:
{"domain":"mzwu.com",
"years":[2006,2007,2008,2009,2010]}
result:
"domain":"mzwu.com"
"years":[2006,2007,2008,2009,2010]
//-----
正则表达式例子2
//reg:
/(0/d{2,3}/)[-]?/d{8}|0/d{2,3}[-]?/d{8}
source:
{(028)-34567890
(231+38383743)
[(0211)-22323623]}
result:
(028)-34567890
(0211)-22323623
//-----
QQ号码:
reg:
^/d{5,12}$
result:5到12位数字
//-----
电子邮件:
reg:
/w+[@]/w+[.]/w+
source:
sjd28232@163.com
36327272@qq.com
28242_1@.
2e_2@263.com
result:
sjd28232@163.com
36327272@qq.com
2e_2@263.com
//-----
正则表达式例子3
//reg:
/"/w.*/"[:]/"/w.*/"
source:
source:
{"weatherinfo":
{"city":"北京",
"city_en":"beijing",
"date_y":"2011年5月31日",
"date":"辛卯年",
"week":"星期二",
"fchh":"18",
"cityid":"101010100",
"temp1":"18℃~32℃",
"temp2":"19℃~34℃",
"temp3":"23℃~33℃",
"temp4":"23℃~29℃",
"temp5":"18℃~31℃",
"temp6":"18℃~35℃",
"tempF1":"64.4℉~89.6℉",
"tempF2":"66.2℉~93.2℉",
"tempF3":"73.4℉~91.4℉",
"tempF4":"73.4℉~84.2℉",
"tempF5":"64.4℉~87.8℉",
"tempF6":"64.4℉~95℉",
"weather1":"多云转晴",
"weather2":"晴",
"weather3":"阴转多云",
"weather4":"多云转雷阵雨",
"weather5":"雷阵雨转阴",
"weather6":"晴",
"img1":"1",
"img2":"0",
"img3":"0",
"img4":"99"}}
result:
"city":"北京"
"city_en":"beijing"
"date_y":"2011年5月31日"
....
"temp1":"18℃~32℃"
"tempF1":"64.4℉~89.6℉"
....