EDIT: I am retiring this question (via vote to close) as I have asked a better question here: Use REGEX to replace X(...) with X{...}
I am updating some code to C++11 that has a tremendous number of Foo() initialisers which should be replaced by Foo{}.
It is not as simple as straightforward search and replace, as nested brackets are possible, e.g. Bar(w("hello"))
I'm looking for something simple that removes most of the effort. (Something that distinguishes when to keep () and when to switch for {} would be very tricky)
I noticed Xcode supports regex search and replace. Is it possible to use this mechanism to replace:
Foo(BLAH)
with
Foo{BLAH}
where BLAH just has to balance the brackets?
I could then run a separate search&replace for each of Foo, Bar, ... .