"local_files_only" mode fails on Windows due to path format inconsistency
### System Info

When loading models using "local_files_only" mode, huggingface goes out to grab the commit hash from a resolved file name. Usually this works fine on POSIX standard OSes, but it fails on Windows due to hardcoded regex search pattern.

This issue can be fixed in one line (add one line in utils/hub.py), see this screenshot:
![hub-fix](https://user-images.githubusercontent.com/13725477/193199857-c8ba5cd3-b9c1-48dc-91f0-7e9bf128c587.jpg)


### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

To reproduce, 

1. Install huggingface transformers on Windows (anaconda)
2. run the following code without "local_files_only" mode and let huggingface cache all the needed files
3. run it again with local_files_only=True

code:

```
from transformers import AutoTokenizer, AutoConfig

model_name = "google/t5-efficient-small"  # any correct model name can used to reproduce the error here. 
config = AutoConfig.from_pretrained(model_name ) 
tokenizer = AutoTokenizer.from_pretrained(model_name, config=config, local_files_only=True)  # TypeError
```



### Expected behavior

Huggingface transformers should work correctly across all supported OSes, using unified file path standard.
One quick fix is provided above, no extended test was conducted on the fix though.

Environment:
Windows 11
Huggingface transformers: 4.22.1
python 3.9
Fixed here https://github.com/huggingface/transformers/pull/19178<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.