On 11 January 2013 12:19, Peter A. Cejchan <[email protected]> wrote: > # remove outermost pair of braces: abcd(x+(y-z))efgh --> abcdx+(y-z)efgh
This, I believe, can't be achieved only with regexps. I'd write a small external program and use it as a filter. > # prefix to postfix operator: ++i --> i++ > [ Edit s/\+\+[a-zA-Z]+[0-9a-zA-Z]*/&++/ Edit s/\+\+/d] using the \1 (used to be undocumented on plan9) may be sometimes easier Edit s/\+\+([A-Za-z]+[A-Za-z0-9])*/\1++/ Ruda
