Unknown variable $title

The title needs to be specified in the preg_replace function from $data. Tested on WP 3.8.1