$n =~ s/(^| )$a( |$)/$1$b$2/i;