Hi,

Here I am again. With another annoying question.

In short I have a string containing coordinates in the following format:
";B[..];W[..];B[..];W[..]"

This is according to the SGF specifications (but not that important)
They represent moves from an asian boardgame. The [] signs hold the 2D coordinates. Each "." is a character from a - s. (The board is a 19x19 matrix). Sometimes there is a ";" sign in between 2 moves but not always. Also the capital characters in between the coordinates: B and W can also have different forms. The first one of the coordinates has to be mirrored so that a "a" becomes an "s", a "b" becomes a "r", a "c" becomes a "q", etc ...

In short:
Only the "[" and "]" sign are always in place.
Only the first coordinate has to be mirrored. (We are mirroring horizontal).
And coordinates are in the range of a to s.

Some examples to make it clear:
ex1: ;B[aa] should become ;B[sa]
ex2: [bs] should become [rs]
ex3: ;W[cb] should become ;W[qb]
ex4: ;W[bb]AB[bc] should become ;W[rb]AB[rc]

I was wondering about doing it with some replace functions or a loop, allthough I'm pretty sure there is a perl way to do it too. What would you do?