my $string ="EICHENBAUMSCHULE"; my @query = qw(EIC BAUM UMS CHU LE); my $matchline = '@' x length $string; for $match(@query) { my $spacer = index $string, $match; $matchline |= (('@' x $spacer) . $match) if $spacer > -1; } print for sort { length($b) <=> length($a) } $matchline =~ /[^@]+/g;
In reply to Re: Regexp string concat
by Jasper
in thread Regexp string concat
by Murcia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |