improved last used log id search regexp