s/(\b)(\@ss|a[^\w]*[s\$]([^\w]*[s\$])+)(\b)/$1***$3/gi;
# To break it down for legibility:
(\b)
(
\@ss
|
a[^\w]*
[s\$]
(
[^\w]*[s\$]
)+
)
(\b)
/$1***$3/gi; am I correct that
Wha, wha, wha--. Why are you capturing \b in the first place? It's an anchor.
It's a line break.