|
Posted by John Dunlop on 12/18/79 11:48
Andy Jeffries:
> OK, so ignoring the latter part about referring to standards, why am I not
> correct?
I didn't say you weren't correct. I just don't see why saying that
you are correct helps.
> OK, considering the two main standards out there (PCRE and POSIX), both of
> them suggest literal hyphens should be quoted within metcharacter classes.
I don't know what you mean. The notation of POSIX regular
expressions does not suggest anything of the sort but actually *rules*
*out* backslashes as escape characters in character classes. The man
pages are quite explicit: backslashes lose their metacharacter
function there. The notation of PCREs does allow backslashes as escape
characters in character classes but also allows literal hyphens to
occur in certain positions unescaped. I don't see how it follows from
that that the notation used by either kind of regular expression, let
alone both, suggests that literal hyphens *should* be escaped.
--
Jock
Navigation:
[Reply to this message]
|