Skip to content

Commit

Permalink
Now using TPerlRegEx.EscapeRegExChars for escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
MauricDaniel committed May 6, 2021
1 parent f58a6f5 commit 7f615b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/ObjectSpace/Ocl/BoldOclSymbolImplementations.pas
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ implementation
BoldSubscription,
BoldValueSpaceInterfaces,
System.RegularExpressions,
System.RegularExpressionsCore,
BoldIsoDateTime;

var
Expand Down Expand Up @@ -3043,8 +3044,7 @@ procedure TBOS_AllSubClasses.Evaluate(const Params: TBoldOclSymbolParameters);

function EscapeRegEx(const ASource: string): string;
begin
result := StringReplace(ASource, '[', '\[', [rfReplaceAll]);
result := StringReplace(result, '%', '', [rfReplaceAll]);
result := TPerlRegEx.EscapeRegExChars(ASource);
end;

procedure TBOS_SQLLike.Evaluate(const Params: TBoldOclSymbolParameters);
Expand Down

0 comments on commit 7f615b6

Please sign in to comment.