Fix the 'some_mixed_string_with_spaces_underscores_and_hyphens' case

This commit is contained in:
Riadh
2019-10-01 14:51:40 +02:00
parent 76ead08704
commit fe4bc649ef

View File

@ -12,7 +12,8 @@ import re
def snake(str):
return '_'.join(re.sub('([A-Z][a-z]+)', r' \1',
re.sub('([A-Z]+)', r' \1', str)).split()).lower()
re.sub('([A-Z]+)', r' \1',
str.replace('-', ' '))).split()).lower()
```
```py