Skip to content

Commit 98d2669

Browse files
authored
Optimize DeactivateVsoCommands regexp (#4862)
* Optimize DeactivateVsoCommands regexp * Use internal cache + don't compile
1 parent b62b727 commit 98d2669

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Agent.Sdk/Util/StringUtil.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,7 @@ public static string DeactivateVsoCommands(string input)
291291
return string.Empty;
292292
}
293293

294-
var vsoRegex = new Regex("##vso", RegexOptions.IgnoreCase);
295-
return vsoRegex.Replace(input, "**vso");
294+
return Regex.Replace(input, "##vso", "**vso", RegexOptions.IgnoreCase);
296295
}
297296
}
298297
}

0 commit comments

Comments
 (0)