1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| function Extraction.Analyser(p_OLEApp : OLEVariant;p_Style, PatternDebExi
, PatternFin, StyleDesc : string; PosDesc,Loc,TypeExtract,ordreExi,indiceDoublon,sourceExi : integer; DescrLong : boolean;liste : IStrMap) : IStrMap;
var
Trouvee : boolean;
CorpsExpReg,CorpsExpRegv2,PageExi,RefExi,TitreExi,ParaExi,DescLongue,verifExi : string;
RegExpExi : IRegex;
mc : IMatchCollection;
begin
if (PosDesc = 1) or (PosDesc = 2) then
begin
CorpsExpReg := '<'+ PatternDebExi +'?*^13';
end else
CorpsExpReg := '<'+ PatternDebExi +'?* ';
CorpsExpRegv2 := '^\s*(' + PatternDebExi + '\w*\s?)(.*)';
RegExpExi := Regex.Create(CorpsExpRegv2);
// recherche dans le document
p_OLEApp.Selection.Find.ClearFormatting;
// recherche par expression réguliere
p_OLEApp.Selection.Find.Text := CorpsExpReg;
p_OLEApp.Selection.Find.MatchWildcards := true |
Partager