/*sas正则表达式*/ filename liu url" http://angelcitiz.tmall.com/shop/view_shop.htm?prt=1346229175121prc=2 "; data aa; infile liu length=len lrecl=4000;; input record $varying4000.len; run; data cc; set aa; if _n_=1 then pattern=prxparse("/\d.\d{4,}分/"); /*注意转义字符*/ retain pattern; call prxsubstr(pattern,record,start,length); if start gt 0 then do; record=substr(record,start,length); record=compress(record," "); output; end; /*keep record;*/ run;