//TPerlRegEx 正则var
txt:array of string;
a:TPerlregex;
i:integer;begin
i:=0;
a:=TPerlRegEx.Create(nil);
a.RegEx:='<.*?>';
a.Subject:='<问世间>,<情为何物>,<直叫人生死相许>';
if a.Match then begin
repeat
// ShowMessage(a.MatchedExpression);
SetLength(txt,i+1);
txt[i]:=a.matchedexpression;
ShowMessage(txt[i]); //返回 <问世间> 匹配
i:=i+1;
until not a.MatchAgain;
end;
txt:=nil;//!!怎么取子表达式呀...我要取 '问世间' 正则达人来帮帮小弟..
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货