Browse Source

* Patch from Benito van der Zander to add extra constructor

git-svn-id: trunk@30365 -
michael 10 years ago
parent
commit
e2500d5a70
1 changed files with 9 additions and 2 deletions
  1. 9 2
      packages/regexpr/src/regexpr.pas

+ 9 - 2
packages/regexpr/src/regexpr.pas

@@ -176,7 +176,7 @@ const
 
 
 const
- NSUBEXP = 15; // max number of subexpression //###0.929
+ NSUBEXP = 90; // max number of subexpression //###0.929
  // Cannot be more than NSUBEXPMAX
  // Be carefull - don't use values which overflow CLOSE opcode
  // (in this case you'll get compiler erorr).
@@ -389,7 +389,8 @@ type
     function GetLinePairedSeparator : RegExprString;
 
    public
-    constructor Create;
+    constructor Create; overload;
+    constructor Create(AExpression:string); overload;
     destructor Destroy; override;
 
     class function VersionMajor : integer; //###0.944
@@ -1201,6 +1202,12 @@ constructor TRegExpr.Create;
  end; { of constructor TRegExpr.Create
 --------------------------------------------------------------}
 
+constructor TRegExpr.Create(AExpression:string);
+begin
+  create;
+  Expression:=AExpression;
+end;
+
 destructor TRegExpr.Destroy;
  begin
   if programm <> nil then