String Methods in Regex Find and Replace
I can find the relevant variables with the regex search "([a-z])([A-Z])", and use "\1_\2" to convert to "example_Variable", but to convert to the desired convention using re.sub() would require something like:
re.sub('([a-z])([A-Z])',lambda match: match.group(1)+"_"+match.group(2).lower(),'exampleVariable')
However, simply placing the inline function in Wing's replace line doesn't achieve the desired effect. Is there an alternative way to accomplish what I'm looking to do?
If you do need to write code for the conversion, you'ld have to do it via the scripting API which is documented at http://wingware.com/doc/scripting probably by operating directory on the CAPIDocument.