#!/usr/bin/perl use strict my $string = "stuff, Hello the name of this site is perlmonks.org, goodbye, stuff"; my ($newstring) = ($string =~ /Hello(.*?)goodbye/); print "'$newstring'\n";