$string = "@current_sentence"; if( $string =~ /.*\bso\b.*/ ) { print $string; } #input: so we can do it again yeah yeah #output: so