"Hugo Smith" <23*2*1*
2@s*u*e*t*u*a*e*u*a*> wrote:
> Hey Chris,
>
> I'm a bit unsure how crazy we should go when validating the glob-patterns given to us. I've nicked your glob2regex function to process any argument following a -i or -o, but the issue is that glob2regex will eat it up and try to turn it into a regular expression even if it's not a proper glob-pattern. Checking whether the subsequent argument is correctly formatted in single-quotes sounds sensible, but I'm not sure whether we should check for things like unbalanced brackets or a missing backslash within the glob-pattern itself. Can we assume a glob-pattern given in the correct position and format will always be valid?
>
> Thanks in advance
Hello Hugo,
Yes, you may assume that the file-patterns provided for testing will be valid one
(checking those is not a focus of the project and, yes, we could write a better
glob2regex()
function, but...)