Normally I would just use boundaries (\b) for this, but since the
current platform is running CF5
How about (non tested)
reReplaceNoCase(attributes.replacedString,
([^a-zA-Z])#wordKey#([^a-zA-Z]), \1**CENSORED**\2, all)
but be aware that any one really will to use badwords will just have
Hi Claude,
Thanks for the help.
How about (non tested)
reReplaceNoCase(attributes.replacedString,
([^a-zA-Z])#wordKey#([^a-zA-Z]), \1**CENSORED**\2, all)
I tried something similar earlier, and tested your suggestion just now:
the above regex seems to be checking for any alpha characters either
before or
after the bad word
It's the opposite: it is checking for one character which is NOT alpha,
before AND after.
The only thing I'm not sure is if it will match in the case of the
beginning and the end of the string.
The only thing I'm not sure is if it will match in the case of the
beginning and the end of the string.
Better make sure, try : (^|[^a-zA-Z])#wordKey#([^a-zA-Z]|$)
Awesome, thanks! Pardon my previous inept description, as I know the
carrot means 'not'.
Mark
4 matches
Mail list logo