I'm coming from a world where we program mostly in C++ and our minimal Python code often uses a mix of Pythonic methods and C++ best practices.
As such I'd like to create some custom regexes for variable naming. Example:
^([a-z]+)(?:([A-Z]{1})([a-z]+))+$|^[A-Z][a-z]+(?:[A-Z][a-z]+)*$
matches both camelCase
and PascalCase
. Sometimes our methods, classes, filenames are PascalCase
and sometimes they are camelCase
. The above regex matches both.
Is it possible to create a pascalCase_or_CamelCase
variable inside of always using the above? There are more examples like this but if one variable can be created based on the above I can follow suit for all the other overrides we need.