in reply to Re^5: Splitting compound (concatenated) words )
in thread Splitting compound (concatenated) words )
Except $s =~ /^$re2$/; How can it match $s from the beginning to the end? And when match occurs how a part of the string which already matched is not considered any more. I understand that you somehow do it by iterations with repeated (xxxx|yyy|zz)? but cannot get it.my $re1 = join '|', sort{ length( $b ) <=> length( $a ) }@subset; my $re2 = "($re1)?" x 20; my @found = $s =~ /^$re2$/; print join '|', @found; my @undefsRemoved = grep defined(), @found; print for @undefsRemoved;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Splitting compound (concatenated) words )
by BrowserUk (Patriarch) on May 17, 2012 at 14:52 UTC |