Made the input regexes more robust

This commit is contained in:
n1073645 2019-11-27 10:24:31 +00:00
parent aa206d7b37
commit a2eadee06a
9 changed files with 42 additions and 17 deletions

View file

@ -44,9 +44,14 @@ class CSVToJSON extends Operation {
];
this.patterns = [
{
match: "([A-Z\s]*,){5}",
match: "^\\s*([A-Z\\s]*,){5}",
flags: "i",
args: [",", "\r\n", "Array of dictionaries"]
},
{
match: "^\\s*([A-Z\\s]*,){5}",
flags: "i",
args: [",", "\r\n", "Array of arrays"]
}
];
}