#!/usr/bin/perl use warnings; use strict; my $string = "\$TYPO3_CONF_VARS['EXT']['extList'] = 'css_styled_content,tsconfig_help,context_help'; // Modified...."; my @output; @output = split(/,/, $string); ($output[0]) =~ s/\$TYPO3_CONF_VARS\[\'EXT\'\]\[\'extList\'\] = \'//; print $output[0]