The only thing you need to modify in your preg_match pattern is to add a parenthesized subexpression. preg_match() will return the entire string if the expression matches; essentially providing a non-false value signifying a successful match. Each parenthesized subexpression, if any, that matches is also returned.
Play with print_r() and/or var_dump() when dealing with the return values of preg_match functions to get a feel for the structure of the return value as it relates to a parenthesized pattern.
$pattern = '/^UU(.*)^Uk/';
$num = preg_match_all($pattern, $searchdata, $matches);
echo "<pre>Matches are:";