in reply to Contents b/w two given text
#!/usr/local/bin/perl -w use strict; my $string = "blah text1 you mean something like this? text2 blah blah +"; my $t1 = 'text1'; my $t2 = 'text2'; my $match = $t1 . '(.*?)' . $t2; if ($string =~ m/$match/s) { print $1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Contents b/w two given text
by halley (Prior) on Aug 25, 2005 at 13:17 UTC |