private function extractIdentifier( $filename )
    {
        // Regex to split up the file name into id, attributes and extension
        $regex = '(
            (?:' . preg_quote( $this->properties['location'] ) . ')
            (?P<id>.*)
            (?P<attr>(?:-[^-=]+=[^-]+)*)
            -? # This is added if no attributes are supplied. For whatever reason...
            (?P<ext>' . preg_quote( $this->options->extension ) . ')
        )Ux';

        if ( preg_match( $regex, $filename, $matches ) !== 1 )
        {
            // @TODO: Should this be an exception?
            return array(
                'id'         => '',
                'attributes' => '',
                'extension'  => $this->options->extension,
            );
        }
        else
        {
            // Successfully split
            return array(
                'id'         => $matches['id'],
                'attributes' => $matches['attr'],
                'extension'  => $matches['ext'],
            );
        }
    }