Displaying 2 results from an estimated 2 matches for "glob2regexp".
2003 Nov 26
0
Question about Unix file paths (and proposal for new regexp class)
...case, an explicit glob() function
> Kurt> seems preferable to me ...
>
> Good idea!
>
> More than 12 years ago, I had a similar one, and wrote a
> "pat2grep()" {pattern to grep regular expression} function
> --- for S-plus on Unix --- which I have now renamed to glob2regexp():
> -- still not really usable outside unix (or windows with the
> 'sed' tool in the path), nor perfect, but maybe a good start:
>
> sys <- function(...) system(paste(..., sep = ""))
>
> glob2regexp <- function(pattern)
> {
> ## Purpose: Change &qu...
2003 Nov 24
8
Question about Unix file paths
Gabor Grothendieck pointed out a bug to me in list.files(...,
full.name=TRUE), that essentially comes down to the fact that in
Windows it's not always valid to add a path separator (slash or
backslash) between a path specifier and a filename. For example,
c:foo
is different from
c:\foo
and there are other examples.
I'm going to fix this, but I'm wondering whether the fix is