From: Stephane Wirtel Date: 2006-01-11T21:33:04+09:00 Subject: ruby and parsing. Hi all, Firstly, Happy New Year :p Secondly, I have a c++ source code with many "try catch". try { } catch (Exception &pException) { } I would like to parse my file and add a 'catch' with std::exception automatically, to get the next example. try { } catch (Exception &pException) { } /// New catch added by a ruby script. catch (std::exception &pException) { } How can I do it ? Because I find some problems :( 1) Try to parse a lot of line with Regexp. 2) In the body of a 'catch', it can contains brackets Best Regards, Stephane