How do I write a regex to replace a with b and b with a so that a&b will become b&a?
UPDATE
It should replace all occurrences of a with b and each b with a. The a&b is just an example to illustrate what I want. Sorry for the confusion.
The traditional generic way is:
Non-generically: