python - regular expression - function body extracting -


For each method definition in some of this type C ++ code, in Python Script:

  Return_Vula classname :: Methathnam (Args) {HIHODODODY}  

I need to remove the three parts: method name for class name, method name and further processing. It is easy to find and remove the class name and method, but is there an easy way to remove this body of this method? With all the possible '{' and '}' inside it? Or are regexes inappropriate for such a task?

  & gt; & Gt; & Gt; S = "" "return_value classname :: Methhtham (args) {{{{}} {{{}}}" "" gt; & Gt; & Gt; ('Classname', 'law' name, 'myodbodie {}')]  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -