> > > +only the first character of \fIresponse\fP is considered significant. > > > +Responses matching \fBm/^[Yy]/i\fP are always accepted as affirmative > > > +(in any locale), and those matching > > > +\fBm/^[Nn]/i\fP are always accepted as negative. > > > > This is more detail than I think is really required to explain > > the point. You already say that just the first character is > > significant. The additional RE isn't needed. > But this happens for any locale; it is a behaviour to document, not an > implementation.
Ahh sorry -- I missed that. I have actually written the (IMO) clearer: [[ Regardless of the locale, responses matching \fB^[Yy]\fP are always accepted as affirmative, and those matching \fB^[Nn]\fP are always accepted as negative. ]] > > .SH BUGS > > The \fBrpmatch\fP() implementation looks at only the first character > > of \fIresponse\fP. As a consequence, "nyes" returns 0, and > > "ynever; not in a million years" returns 1. > > It would be preferable to accept input strings much more > > strictly, for example (using the extended regular > > expression notation described in \fBregex\fP(7)): > > \fB([yY]|yes|YES)\fP and \fB([nN]|no|NO)\fP. > Why not anchor with "^" and "$"? Because I am fallible. Fixed now. Thanks, Michael -- Michael Kerrisk maintainer of Linux man pages Sections 2, 3, 4, 5, and 7 Want to help with man page maintenance? Grab the latest tarball at ftp://ftp.win.tue.nl/pub/linux-local/manpages/, read the HOWTOHELP file and grep the source files for 'FIXME'. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

