Delphi 利用自带类TRegEx实现正则匹配
uses RegularExpressions; //相关单元 var matchs: TMatchCollection; const encryp_RexStr = 'encryptAccountId(.*?)isGold'; matchs := TRegEx.Matches(sResponseHtml, encryp_RexStr); if matchs.Count = 1 then begin tmpShopInfo.encryptAccountId := matchs.Item[0].Groups[1].Value; ... ... end
Copyright © 2014 DelphiW.com 开发 源码 文档 技巧 All Rights Reserved
晋ICP备14006235号-8 晋公网安备 14108102000087号
执行时间: 0.26396703720093 seconds