Eric S Fraga <ucec...@ucl.ac.uk> wrote: > > echo /foo | egrep '^(/|[A-z]:/)' > > > > do you get the bad range end error message? If so, then your egrep > > is indeed stricter than mine. > > I do indeed: > > : egrep: Invalid range end. > > Very strange. > > > > > LC_ALL=C texi2dvi ... > > > > > > but this may have unexpected side effects? I'm not sure if any of the > > > latex suite use the locale... > > > > Yeah, perhaps... > > Interestingly, it *is* a locale issue: > > : $ echo /foo | LC_ALL=C egrep '^(/|[A-z]:/)' > : /foo >
Yup: the egrep man page says ,---- | Within a bracket expression, a range expression consists of two | characters separated by a hyphen. It matches any single character that | sorts between the two characters, inclusive, using the locale’s | collating sequence and character set. For example, in the default C | locale, [a-d] is equivalent to [abcd]. Many locales sort characters in | dictionary order, and in these locales [a-d] is typically not equivalent | to [abcd]; it might be equivalent to [aBbCcDd], for example. To obtain | the traditional interpretation of bracket expressions, you can use the C | locale by setting the LC_ALL environment variable to the value C. `---- So as Achim pointed out, unless texi2dvi explicitly specifies the locale for egrep, that regexp is busted. Even [A-Za-z] is busted in the absence of a locale: it would have to be something like [:alpha:], although I'm not sure what DOS allows/requires as a drive prefix. And even in the C locale, [A-z] allows non-letters which, I'm pretty sure, cannot be used as drive prefixes. Nick _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode