This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [regex] Fix BZ429


>   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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]