There is no regex() function in base. There is one, however in stringr, maybe that's the one you are using?
❯ base::regex
Error: object 'regex' not found
❯ getAnywhere("regex")
no object named ‘regex’ was found
❯ stringr::regex
function (pattern, ignore_case = FALSE, multiline = FALSE, comments = FALSE,
dotall = FALSE, ...)
Manual pages do not always correspond to single functions. Sometimes they do not correspond to functions at all, but they just document a topic. There is a manual page called regex but no function with that name, at least not in base R.