I'm not sure what output you're hoping for, but there's certainly something odd in the regexp, and I don't think that the code you've posted here produces the output you've posted here. Certainly isn't the case when I try it.
Did you want the final line of output to be this:
(ABE)
If so, you'll need to insert some []s to indicate that A-Z is one of a range of characters and remove some ?s to insist on brackets in the bits of your input you want to substitute. However, I can't commit myself to a final answer until I'm more cetain of what you're after :-)
--
.sig : File not found.