digital-preservation / csv-schema

CSV Schema
http://digital-preservation.github.io/csv-schema
Mozilla Public License 2.0
100 stars 33 forks source link

Add prefixedRange to CSV Schema Language 1.2 #12

Open DavidUnderdown opened 7 years ago

DavidUnderdown commented 7 years ago

Service numbers often have a non-numeric prefix, but then the numeric part may be within a well-defined numeric range. It's possible to do a bit of checking that the number is within an expected range using regex, but it's not easy to read, and difficult to be absolutely precise. It would be helpful if you could do something like prefixedRange("JX ",125000,145750).

There's some similarity between this and being able to supply a fixed path to prefix to a file expression (though the implementation would need to be different.