This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


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

Re: Another RFC: regex in libiberty



Jim Blandy <jimb@cygnus.com> writes:
> To generate every possible match, you have to choose every possible
> way to divide up those twenty a's amongst six .* patterns.  I think
> this is 20 choose 5, or 1.9 million, matches you have to try.  In
> general, I think the time to match POSIXly can increase exponentially
> in the length of your regexp, given a long enough data string.

20 choose 5 is, of course, only 15504, not 1.9 million.  Oops.


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