Michael Pratt wrote at Fri, 14 Jun 2002 00:14:41 +0200:

> Well that doesnt give me what I want.  I want to search a text file for a Key word 
>then display
> the contents to a second keyword.
> 
> For example take the above paragraph and display just ' want to search a text file 
>for a Key word
> '  thats it.
> 
> 

So you also should have a look to a regex like:

my ($content_between_keywords) =
    $text =~ /\Q$keyword1\E (.*?) \Q$keyword2\E/sx;


or in the upper case, its:

my $content = $text =~ /I (.*?) then/sx;

but $content would be
' want.   I want to search ...', because I starts earlier :-)

Best Wishes,
Janek

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to