Fixed DrawingInfo regex pattern to work with letters.

Wasn't recognizing the -G in 4970A16-G
This commit is contained in:
AJ
2018-10-09 10:12:14 -04:00
parent b1d7540924
commit 67a9c9b3da

View File

@@ -30,7 +30,7 @@ namespace ExportDXF
public static DrawingInfo Parse(string input) public static DrawingInfo Parse(string input)
{ {
const string pattern = @"(?<jobNo>[34]\d{3}(-\d+\w{1,2})?)\s?(?<dwgNo>[ABEP]\d+(-\d+|[A-Z])?)"; const string pattern = @"(?<jobNo>[34]\d{3}(-\d+\w{1,2})?)\s?(?<dwgNo>[ABEP]\d+(-?(\d+|[A-Z]))?)";
var match = Regex.Match(input, pattern); var match = Regex.Match(input, pattern);