Regex is NOT a more efficient method and should not be used here since the possible outputs of get_user_authid() and get_user_ip() are very limited (in fact, the IP output from the function will always be valid). Connor's method will be more efficient.