in reply to Re: Regular expressions
in thread Capturing text between literal string delimiters (was: Regular expressions)
Split will work fine, but you have to do some funny schtuff.
my @strings = map {/\w/ ? /^\s*(.*?)\s*$/ : ()} split /\bsp\b/, $string;