adapted from: http://oddhypothesis.blogspot.be/2012/05/regex-named-capture-in-r.html
match_path(pattern, path, ...)
regex pattern
the path to test the regex pattern against
arguments passed to regexpr
regexpr