in reply to Regexp string concat

This doesn't handle any error conditions, like if the query contains non-matches, but it may give you a starting point.

#! perl -slw use strict; sub display{ my $string = shift; return $string . $/, map{ ' ' x index( $string, $_ ) . "$_\n" } @_; } my $string ="EICHENBAUMSCHULE"; my @query = qw( EIC BAUM UMS CHU LE ); print display( $string, @query ); __END__ P:\test>366569 EICHENBAUMSCHULE EIC BAUM UMS CHU LE

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail

Replies are listed 'Best First'.
Re^2: Regexp string concat
by Murcia (Monk) on Jun 14, 2004 at 17:13 UTC
    but this does not give me the longest concatenated string "BAUMSCHULE"