diff --git a/graphene/utils/str_converters.py b/graphene/utils/str_converters.py index 3b06ee05..ae8ceffe 100644 --- a/graphene/utils/str_converters.py +++ b/graphene/utils/str_converters.py @@ -18,4 +18,4 @@ def to_snake_case(name): def to_const(string): - return re.sub('[\W|^(?=\d)]+', '_', string).upper() + return re.sub('[\W|^]+', '_', string).upper()