Achim Gratz <strom...@nexgo.de> wrote: > Otherwise you can't really use range expressions or character classes at > all since they either permit illegal drive letters or might not work > with due to the bugs in older versions of grep... it would however be > possible to spell out each drive letter bot in upper and lower case, > although that handicaps the permissible length of the filename (if the > "-i" switch wasn't broken in some locales one could use it and save one > version of the cases): > > echo "$command_line_filename" | LC_ALL=C $EGREP \ > '^(/|[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:/)' >&6 \ > || command_line_filename="./$command_line_filename" > > *Shudder* :-) >
Indeed :-) There is a locale-independent range spec for regexps: [:alpha:] would match the indicated class in any locale. See the egrep man page for more of these. I sent some mail to bug-texi...@gnu.org suggesting this, so we'll see. I also found out to my surprise from the previously posted bug-texinfo thread, that the ASCII characters between 'Z' and 'a' are (or were) legal drive letters, but the assumption is that nobody would be so foolish as to use them any more, so not checking for them is OK. 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