If you want to use preg_replace():
$new_str = preg_replace('/ - .*/', '', $thread['threadprefix']);
str_replace() is normally faster than preg_replace, though there may not be much difference in this case since the str_replace() solution requires calls to other string functions, though practically speaking either method in this fairly simple case will probably be within a millisecond or two of each other.