Fix the error that regular expression match for `std::function` in the `from_type` function