Your regex doesn't match the data you're giving it! Your string is "C:/jobs/writebacks", but your regex says: "match a non-colon character, than a /, then zero or more characters, then a /, then the end of the string". The first problem is that you probably meant
[^:]:, which would match a non-colon (like 'C') and then the colon after it. But why not just use the File::Basename module?