In a message dated 6/16/2004 12:10:54 PM Eastern Daylight Time, [EMAIL PROTECTED] writes: >Thanks in advance for your kind help. > >For the following string: > >"uuuu axyzb oooo cxyzd vvvv" > >What is the command to extract the substrings with "xyz" in them? In this case, I'd like to >get two strings "axyzb" and "cxyzd".
Untested: my $t = 'uuuu axyzb oooo cxyzd vvvv'; my @matched = ($t =~ /([^ ]*xyz[^ ]*)/g); -will http://www.wgunther.tk (the above message is double rot13 encoded for security reasons) Most Useful Perl Modules -strict -warnings -Devel::DProf -Benchmark -B::Deparse -Data::Dumper -Clone -Perl::Tidy -Beautifier -DBD::SQLite -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>