Re: RE replace problem too

2009-06-12 Thread Lie Ryan
oyster wrote: > in my case, I want to replace all the function name with '', that is > sin(1) -> (1) > sin(pi*(2+4)) -> (pi*(2+4)) > how can I use RE in this situation? thanx this works if there is no implicit multiplication: re.sub('\w+\(', '(', 'sin(pi*(2+4))') this one might be more robust

RE replace problem too

2009-06-12 Thread oyster
in my case, I want to replace all the function name with '', that is sin(1) -> (1) sin(pi*(2+4)) -> (pi*(2+4)) how can I use RE in this situation? thanx -- http://mail.python.org/mailman/listinfo/python-list