[regex] Fix BZ429
Paolo Bonzini
paolo.bonzini@lu.unisi.ch
Fri Nov 12 08:35:00 GMT 2004
> 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
More information about the Libc-alpha
mailing list