if ( $text =~ /whatever/i ) { return( substr( $text, 0, $-[0] ), substr( $text, $+[0] ); }