in reply to Re: retain longest multi words units from hash
in thread retain longest multi words units from hash

your interpretation of the question is different to mine.

DB<50> p 'a b c' =~ join '.*?', map "\\b$_\\b", split ' ', 'a c' 1

you seem to check for ordered subsets in the same order, while I only look for subsequences like a b and b c .

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Replies are listed 'Best First'.
Re^3: retain longest multi words units from hash
by tybalt89 (Monsignor) on Jul 28, 2018 at 20:09 UTC

    Don't you just love ambiguous specs? :)

      > Don't you just love ambiguous specs? :)

      Almost as much as deciphering your code... ;-)

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice