OSDN Git Service

正規表現検索系を再修正 (ToDo #389)
authorC.Ponapalt <ponapalt@shillest.net>
Thu, 11 Mar 2004 08:07:08 +0000 (08:07 +0000)
committerC.Ponapalt <ponapalt@shillest.net>
Thu, 11 Mar 2004 08:07:08 +0000 (08:07 +0000)
bottleclient/SearchLog.pas

index 0afb70e..3f8122b 100644 (file)
@@ -204,7 +204,7 @@ begin
 end;
 
 procedure TfrmSearchLog.btnOkClick(Sender: TObject);
-var tmpScriptPattern,tmpStringReplace : String;
+var tmpScriptPattern : String;
 begin
   tmpScriptPattern := edtScriptPattern.Text;
 
@@ -214,12 +214,10 @@ begin
     begin
       try
         //Perl\82Ì\90³\8bK\95\\8c»\8d\\95\82É\83}\83b\83`\82·\82é\90³\8bK\95\\8c»\82Å\83`\83F\83b\83N
+        //k\83I\83v\83V\83\87\83\93\82Í\8a¿\8e\9a\91Î\89\9e
+        //#255(0xFF)\82Í\82 \82è\82¦\82È\82¢\82Ì\82Å\82±\82±\82Å\97\98\97p
         if not brx.Match('m/^m?(.).+\1\w*$/k',tmpScriptPattern) then
-        begin
-          tmpStringReplace := tmpScriptPattern;
-          tmpStringReplace := StringReplace(tmpStringReplace, '/', '\/', [rfReplaceAll]);
-          tmpScriptPattern := 'm/' + tmpStringReplace + '/k'; //k\83I\83v\83V\83\87\83\93\82Í\8a¿\8e\9a\91Î\89\9e
-        end;
+          tmpScriptPattern := 'm'#255 + tmpScriptPattern + #255'k';
       except
         tmpScriptPattern := '';
       end;