np.fromregex is currently the only file-manipulation-function that does not accept path-like objects such as pathlib.Path.
The root of this issue stems from the np.DataSource class, which it uses for parsing path-like objects, assuming that the passed path is always a string.