<?php

$my_string = 'Auth code: 02452A</div>';
preg_match("~Auth code:\s*\K\w+~",$my_string, $m);
print_r($m[0]);