Skip to content

Commit fe44f6c

Browse files
authored
Merge pull request #65 from Botinoc/dev
Cisco ASA : allowing special characters to be used as part of nameif
2 parents bfe491c + ca37719 commit fe44f6c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

CiscoMigration/CiscoParser.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,15 @@ private void ParseCommands(string filename)
166166
continue;
167167
}
168168

169+
var text = line;
170+
if ((!text.Contains("no nameif") && text.Contains("nameif")) || text.Contains("ip verify reverse-path interface") || text.Contains("mtu"))
171+
{
172+
text = System.Text.RegularExpressions.Regex.Replace(text, @"[()#/@;:<>{}`+=~|.!?,]", "");
173+
}
169174
var command = new CiscoCommand
170175
{
171176
Id = lineId,
172-
Text = line
177+
Text = text
173178
};
174179

175180
int indentationChange = command.IndentationLevel - prevIndentationLevel;

0 commit comments

Comments
 (0)