score:1

Accepted answer

a regular expression replacement over files; replace

\)\s*(//.*)(\r?\n)(\s*)\{
     1     2      3

with:

) {\2\3    \1\2

update (garret wilson): after much experimentation, the ideal regular expression replacement that addressed all the variations and met my needs was:

^([^/]*(?:\)|\>|do|else|exception|static|try))\s*(//.*)(\r?\n)(\s*)\{

replaced with:

\1 {    \2

Related Query

More Query from same tag