It's UWAweek 8


This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.
Displaying selected article
Showing 1 of 1168 articles.
Currently 4 other people reading this forum.

 UWA week 40 (2nd semester, week 10) ↓
SVG not supported

Login to reply

1:02pm Mon 2nd Oct, Christopher M.

"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...)

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  5:07AM Sep 06 2023
Privacy policy