| Welcome to WebmasterWorld Guest from 188.8.131.52 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor 2014|
|Can you filter profanity while keeping upper and lowercased letters?|
How the @$#%! do they do it?
I can change change everything the uppercase or lowercase, and then censor, but then the entire filtered message ends up in either uppercase or lowercase.
Is there an ASP/VBscript workaround for this? ASP.net maybe?
There's nothing intrinsic; you'll need to write your own solution...
Use the VBScript/ASP Replace function. vbTextCompare is case-insensitive:
Replace(expression, find, replacewith[, start[, count[, compare]]])
Const vbTextCompare = 1
strText = Replace(strText, strProfanity, "****", 1, 10000, vbTextCompare)
Thank you -so- much. I was literally losing sleep over this.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved