|
@@ -280,7 +280,8 @@ type
|
|
{$IFDEF UnicodeWordDetection}
|
|
{$IFDEF UnicodeWordDetection}
|
|
FUseUnicodeWordDetection: boolean;
|
|
FUseUnicodeWordDetection: boolean;
|
|
{$ENDIF}
|
|
{$ENDIF}
|
|
-
|
|
|
|
|
|
+ FEmptyImputRaisesError : Boolean;
|
|
|
|
+
|
|
CharCheckers: TRegExprCharCheckerArray;
|
|
CharCheckers: TRegExprCharCheckerArray;
|
|
CharCheckerInfos: TRegExprCharCheckerInfos;
|
|
CharCheckerInfos: TRegExprCharCheckerInfos;
|
|
CheckerIndex_Word: byte;
|
|
CheckerIndex_Word: byte;
|
|
@@ -616,6 +617,9 @@ type
|
|
property UseOsLineEndOnReplace: boolean read FUseOsLineEndOnReplace write SetUseOsLineEndOnReplace;
|
|
property UseOsLineEndOnReplace: boolean read FUseOsLineEndOnReplace write SetUseOsLineEndOnReplace;
|
|
|
|
|
|
property SlowChecksSizeMax: integer read fSlowChecksSizeMax write fSlowChecksSizeMax;
|
|
property SlowChecksSizeMax: integer read fSlowChecksSizeMax write fSlowChecksSizeMax;
|
|
|
|
+
|
|
|
|
+ // Raise error when input string is empty
|
|
|
|
+ Property EmptyImputRaisesError : Boolean Read FEmptyImputRaisesError Write FEmptyImputRaisesError;
|
|
end;
|
|
end;
|
|
|
|
|
|
type
|
|
type
|
|
@@ -4176,7 +4180,8 @@ begin
|
|
// Check InputString presence
|
|
// Check InputString presence
|
|
if fInputString = '' then
|
|
if fInputString = '' then
|
|
begin
|
|
begin
|
|
- Error(reeNoInputStringSpecified);
|
|
|
|
|
|
+ if EmptyImputRaisesError then
|
|
|
|
+ Error(reeNoInputStringSpecified);
|
|
Exit;
|
|
Exit;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -4288,7 +4293,7 @@ begin
|
|
end;
|
|
end;
|
|
end; { of procedure TRegExpr.SetLineSeparators
|
|
end; { of procedure TRegExpr.SetLineSeparators
|
|
-------------------------------------------------------------- }
|
|
-------------------------------------------------------------- }
|
|
-
|
|
|
|
|
|
+
|
|
procedure TRegExpr.SetLinePairedSeparator(const AStr: RegExprString);
|
|
procedure TRegExpr.SetLinePairedSeparator(const AStr: RegExprString);
|
|
begin
|
|
begin
|
|
if Length(AStr) = 2 then
|
|
if Length(AStr) = 2 then
|
|
@@ -4389,7 +4394,8 @@ begin
|
|
Exit;
|
|
Exit;
|
|
if fInputString = '' then
|
|
if fInputString = '' then
|
|
begin
|
|
begin
|
|
- Error(reeNoInputStringSpecified);
|
|
|
|
|
|
+ if EmptyImputRaisesError then
|
|
|
|
+ Error(reeNoInputStringSpecified);
|
|
Exit;
|
|
Exit;
|
|
end;
|
|
end;
|
|
// Prepare for working
|
|
// Prepare for working
|