in reply to regexp help -- word boundaries
Not the prettiest, but this should work:
$n =~ s/(?:^|([ ]))$a(?:([ ])|$)/($1 ? $1 : "") . $b . ($2 ? $2 : "" +)/ie; [download]