Gábor Csárdi
Gábor Csárdi
But then you need to review them. :)
Quick q. I need some regular expression matching for `path_isabs` on windows. Do you mind if I depend on this: https://github.com/MangoTheCat/rematch ? It is small, R-only and has no dependencies....
@jennybc Yeah, right? :) I wrote this about ~5 times at various places, and today I decided that it was enough. It is hard to get all the corner cases...
@jennybc I don't think you can in PCRE. It is not in the docs, and the obvious `(?:...)` syntax does not work.
@jennybc I might misunderstand sg, but `path_rel()` already does what you want, no?
\o/
Would these be functions? I guess some of them have to be, so why not all?
R follows the Unix convention, btw.: ``` r ❯ basename("/foo/bar/") [1] "bar" ```
Essentially, Python always returns a file name (or an empty string). Which makes sense to me, but then I would not call it `basename`, just because that's a standard Unix...
Yes, agreed. As for the Python-like behaviour, how about having a separate function that behaves like that, i.e. always gives a file name (or nothing)?