with TPerlRegEx.Create do
try
Options := [preSingleLine];
Subject := Memo1.Text;
RegEx := '<ul class="mainTextColor">(.*?)</ul>';
if not Match then
Exit; Subject := Groups[1];
RegEx := ' |<a.*?>';
ReplaceAll; Start := 1;
RegEx := '<li.*?>(.*?:)\s*(.*?)\s*</';
Replacement := '\1\2';
while MatchAgain do
Memo2.Lines.Add(ComputeReplacement); finally
Free
end;
try
Options := [preSingleLine];
Subject := Memo1.Text;
RegEx := '<ul class="mainTextColor">(.*?)</ul>';
if not Match then
Exit; Subject := Groups[1];
RegEx := ' |<a.*?>';
ReplaceAll; Start := 1;
RegEx := '<li.*?>(.*?:)\s*(.*?)\s*</';
Replacement := '\1\2';
while MatchAgain do
Memo2.Lines.Add(ComputeReplacement); finally
Free
end;
倒是得到正确结果