$def =~ s/( \A \. \w+ \s ) (\w+)(\s+)(.+?\s+)(select[^\.\.])/$2,$5/ or die 'Failed to match';