Regular Expression experience?
I am learning programming right now and am studying Regular Expressions. It got me thinking about chat and forum postings and how some words or phrases rub people the wrong way, or just don't help a conversation along. Regular Expressions look like the perfect system of substitution for a forum?
The intro video of nodeBB mentions that post amendments are relayed in real time to all users, which is brilliant, and was wondering if there was a filter system in place already? Or, if it would take a lot of effort to modify the codebase to achieve this?
I would also be keen to know if Regular Expressions is the right way to go about implementing an automatic substitution feature; so that a user to explicitly designate words they did not wish to see for another, or just not at all, but it would not be global, simply restricted to that user?
There are forum plugins that censor words forum-wide. As for per user censoring, that is more a browser extension thing imo.
Regular expressions could be used to find offensive words or phrases, but using them wouldn't necessarily be better than a flat list of words to censor. Using regex in practice for this task would actually probably be worse, because of the overhead of having to know how to construct and modify regexes, which can quickly become nontrivial.