Procházet zdrojové kódy

mxg:修改正则表达式,前后限定

mengxiangge před 6 roky
rodič
revize
0b844470c6
2 změnil soubory, kde provedl 46 přidání a 7 odebrání
  1. 8 7
      MBI/SAGA.MBI/Common/RegexConstPattern.cs
  2. 38 0
      MBI/SAGA.Revit.sln

+ 8 - 7
MBI/SAGA.MBI/Common/RegexConstPattern.cs

@@ -16,22 +16,23 @@ namespace SAGA.MBI.Common
     /// </summary>
     class RegexConstPattern
     {
-        public const string IsSpaceId = @"Si\S*";
-        public const string IsEquipId = @"Eq\S*";
-        public const string IsEquipPartId = @"Ec\S*";
-        public const string IsBeaconId = @"VOBc\S*";
+        public const string IsSpaceId = @"^Si\S*";
+        public const string IsEquipId = @"^Eq\S*";
+        public const string IsEquipPartId = @"^Ec\S*";
+        public const string IsBeaconId = @"^VOBc\S*";
 
         public const string IsFamilyCode = @"\s*-\s*\S*";
 
         public const string IsEquip = @"^[A-Z]{4}\s*-\s*\S*";
         public const string IsEquipPart = @"^[A-Z]{6}\s*-\s*\S*";
+        public const string IsBeacon = @"^Beacon$";
 
-        public const string IsMBILevel = @"([BF][1-9]\d*M?\d?|RFM?\d?)";
+        public const string IsMBILevel = @"^([BF][1-9]\d*M?\d?|RFM?\d?)$";
         public const string IsMBIView = @"^([BF][1-9]\d*M?\d?|RFM?\d?)-saga$";
-        public const string IsSandwich = @"([BF][1-9]\d*M\d?|RFM\d?)";
+        public const string IsSandwich = @"^([BF][1-9]\d*M\d?|RFM\d?)$";
 
         public const string IsRF = @"^RF(-saga)?$";
-        public const string IsRFM = @"RFM\d*";
+        public const string IsRFM = @"^RFM\d*$";
         public const string IsOnground = @"^F\s*";
         public const string IsUnderground = @"^B\s*";
 

+ 38 - 0
MBI/SAGA.Revit.sln

@@ -63,6 +63,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestCommand", "TestCommand\
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ToolCommand", "ToolCommand\ToolCommand.csproj", "{5F2C216B-F298-4D86-A768-900BFFFEA91F}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceRevitLib", "ServiceRevitLib\ServiceRevitLib.csproj", "{7B748B09-DC20-4406-85A3-101E7833F8CE}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -928,6 +930,42 @@ Global
 		{5F2C216B-F298-4D86-A768-900BFFFEA91F}.RR17|x64.Build.0 = Release|Any CPU
 		{5F2C216B-F298-4D86-A768-900BFFFEA91F}.RR17|x86.ActiveCfg = Release|Any CPU
 		{5F2C216B-F298-4D86-A768-900BFFFEA91F}.RR17|x86.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Debug|x64.Build.0 = Debug|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Debug|x86.Build.0 = Debug|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R16|Any CPU.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R16|Any CPU.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R16|x64.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R16|x64.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R16|x86.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R16|x86.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R17|Any CPU.ActiveCfg = Debug|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R17|Any CPU.Build.0 = Debug|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R17|x64.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R17|x64.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R17|x86.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R17|x86.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R18|Any CPU.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R18|Any CPU.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R18|x64.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R18|x64.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R18|x86.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R18|x86.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Release|Any CPU.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Release|x64.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Release|x64.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Release|x86.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Release|x86.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.RR17|Any CPU.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.RR17|Any CPU.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.RR17|x64.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.RR17|x64.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.RR17|x86.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.RR17|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE