in reply to Re: Searching for regular expression overlaps
in thread Searching for regular expression overlaps

I understood only pairwise comparisons are necessary

So it's only quadratic: n(n-1)/2 = 19900

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

  • Comment on Re^2: Searching for regular expression overlaps

Replies are listed 'Best First'.
Re^3: Searching for regular expression overlaps
by Laurent_R (Canon) on Aug 13, 2016 at 17:45 UTC
    Yes, Rolf, it seems that you're right.

    But 19900 is still far too many combinations for a manual check.

      > But that's still far too many for a manual check.

      Manually ? Probably...

      Worst case meant checking 200+ regexes each time a new one is added.

      But it depends on the structure, when de-parsing Perl's internal representation ( use re "debug" ) you'll see that leading and trailing substrings get special treatment.

      Anyway... Don't let us waste energy on a XY question. :)

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Je suis Charlie!