OSDN Git Service

SafeRegExpの条件を絞る
authorC.Ponapalt <ponapalt@shillest.net>
Thu, 11 Mar 2004 16:50:48 +0000 (16:50 +0000)
committerC.Ponapalt <ponapalt@shillest.net>
Thu, 11 Mar 2004 16:50:48 +0000 (16:50 +0000)
bottleclient/BottleDef.pas

index e15eaa2..fac853d 100755 (executable)
@@ -475,7 +475,7 @@ begin
     //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 RegExp.Match('m/^m?(.).+\1[ikms]{0,4}$/k', Result) then
+    if not RegExp.Match('m'#255'^m[/#({\[].+[/#)}\]][ikms]{1,4}$'#255'k', Result) then
       Result := 'm'#255 + Result + #255'k';
   except
     on EBRegExpError do