[darcs-users] Error on systems with case insensitive filesystems

Dan Pascu dan at ag-projects.com
Fri Oct 30 11:16:04 UTC 2009

On 26 Oct 2009, at 16:41, Jason Dagit wrote:
> What does (^|/) match?

It matches the following token either at the beginning or after a /,  
in other words the core can be either at the top level directory or in  
some subdirectory. I'm a bit surprised that this construct is so  
unexpected to you since its used all over the default boring file.

> Similarly, (\.[0-9]+|)$ is odd to me.

It's the same. It matches either .NNNN or nothing at the end of the  
match, i.e. either core or core.NNNN

> I just looked at the pcrepattern, regex, and re_format man pages on  
> linux and the only meaning for | that I could find is to separate  
> two or more alternatives.

That's exactly what it does.

> I did learn that character classes should be preferred over ranges  
> for portability (although, I don't see how an implementation could  
> screw up on [0-9] and still be a correct implementation).
> Is it possible that the second | in the pattern for core files is  
> erroneous?

I don't think so. That is a valid regular expression.

> Perhaps the linux posix library for regular expressions ignores the  
> error (or maybe it's not even an error) while the os x  
> implementation complains?

The regex is valid. I do not expect linux to ignore the error yet  
still produce the correct result ;)

I'm more inclined now to believe that this is a bug in the OS X regex  
implementation and that it has nothing to do with the case sensitivity  
of the filesystem.


More information about the darcs-users mailing list