regexec calls with REG_STARTEND find ghost matches for \>

Benno Schulenberg bensberg@justemail.net
Sun Jan 15 19:29:00 GMT 2017


When calling regexec with the REG_STARTEND flag and providing
an end-of-range value in .rm_eo that points to somewhere in
the middle of a word, regexec will nevertheless find a match
for \> at that offset.  The corresponding case for \<, with a
start-of-range value in .rm_so that points to the middle of a
word, will /not/ find a match for \< there.  The latter is
what I expected, the former was a surprise.

See attached two files for a demonstration of the above two
cases.

I know that REG_STARTEND is undocmented, but why is that?
Because it is not working right?  Or because you don't want
people to use it?  But what is the point of having a function
when it can't be used?

(Please CC; not subscribed.)

Benno

-- 
http://www.fastmail.com - Does exactly what it says on the tin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: until.c
Type: text/x-csrc
Size: 583 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170115/be6bc215/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: from.c
Type: text/x-csrc
Size: 613 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170115/be6bc215/attachment-0001.bin>


More information about the Libc-alpha mailing list