This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [regex] Fix BZ429
- From: "Paolo Bonzini" <paolo dot bonzini at lu dot unisi dot ch>
- To: "Ulrich Drepper" <drepper at redhat dot com>
- Cc: <libc-alpha at sources dot redhat dot com>
- Date: Fri, 12 Nov 2004 09:35:03 +0100
- Subject: Re: [regex] Fix BZ429
- References: <4191F700.2030707@lu.unisi.ch> <41945CBD.7090501@redhat.com>
> p = "^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?).?"
> "\\9\\8\\7\\6\\5\\4\\3\\2\\1$";
> m[0] = "civic"
> m[1] = "c"
> m[2] = "i"
Doesn't this obey leftmost-longest? The middle "v" is matched by the .?
outside of the regex.
Sorry if I am missing something obvious. And answering Jakub:
> Wouldn't it be better to use unsigned short here when you use it as
> a bitfield?
Perhaps yes, but I only use & and |, not shifts so it does not matter.
Paolo