diff --git a/MLEM/Formatting/Codes/SimpleEndCode.cs b/MLEM/Formatting/Codes/SimpleEndCode.cs
index 0c3aa38..f33cc3c 100644
--- a/MLEM/Formatting/Codes/SimpleEndCode.cs
+++ b/MLEM/Formatting/Codes/SimpleEndCode.cs
@@ -8,7 +8,7 @@ namespace MLEM.Formatting.Codes {
///
public SimpleEndCode(Match match, Regex regex, string codeNameToEnd) : base(match, regex) {
- this.codeToEnd = new Regex($"<{codeNameToEnd}.*>");
+ this.codeToEnd = new Regex($@"<{codeNameToEnd}(\W.*)?>");
}
///